如何在记事本++中禁用文本拖放

问题描述 投票:9回答:1

我有触摸屏,在Notepad ++中为我启用了拖放功能很不方便。无论如何,我从未使用过拖放功能。但是我找不到如何禁用它,这有可能吗?我说的是文本拖放,我在设置中可以找到的唯一选项与标签栏拖放有关。

notepad++
1个回答
1
投票

注:询问了herehere。还有一个增强请求here仍处于打开状态。

如果有人正在从源代码构建Notepad++,那么我建议采用以下解决方法。

Notepad++中的Scintilla的编辑器组件实际上负责拖放功能(这可以通过使用SciTE确认)。因此,禁用此功能的一种方法是修改用于构建SciLexer.dll here的源代码。

在Visual Studio中调试Notepad++项目后,我发现ButtonMoveWithModifiers下的此函数Editor.cxx负责拖放功能。特别是Editor.cxx代码段:

this

所以,将代码块结果注释为此


    if (inDragDrop == ddInitial) {
        if (DragThreshold(ptMouseLast, pt)) {
            SetMouseCapture(false);
            FineTickerCancel(tickScroll);
            SetDragPosition(movePos);
            CopySelectionRange(&drag);
            StartDrag();
        }
        return;
    }

在源代码中进行了这一更改,构建了新的/* if (inDragDrop == ddInitial) { if (DragThreshold(ptMouseLast, pt)) { SetMouseCapture(false); FineTickerCancel(tickScroll); SetDragPosition(movePos); CopySelectionRange(&drag); StartDrag(); } return; } */ 。您可以保留以前版本的dll作为备份,以防万一您想切换回拖放功能。

但是,如果您不是从源代码构建SciLexer.dll,而是希望通过可执行文件进行安装,请记下Notepad++的当前版本,并下载该版本的scintilla源代码。

因此,如果您的Notepad++版本为v7.8.1,则指向scintilla源的URL为:

Notepad++

要下载单个文件夹或目录,请遵循https://github.com/notepad-plus-plus/notepad-plus-plus/tree/v7.8.1/scintilla ,或仅使用此链接下载:

this

(基于答案https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/notepad-plus-plus/notepad-plus-plus/tree/v7.8.1/scintilla

注意: 用您的NPP版本替换v7.8.1

如上所述修改here并按照Editor.cxx指南构建新的dll。


这里是为您完成更改的分叉存储库,只需从this构建Notepad ++。

<<
© www.soinside.com 2019 - 2024. All rights reserved.