SurroundSelection sometimes hijacks shortcut Ctrl+Shift+2
-
I’m pasting in the issue I submitted over at dail’s SurroundSelection project.
I (and maybe also dail) would like to know if other people are seeing the same behavior.
====
When SurrSel is enabled, and text is selected, shortcut Ctrl+Shift+2 results in a SurrSel-like action where the text is surrounded by a pair of
NUL
:… rather than the default action of jumping to the previous instance of text with “Style 2”.
Problem goes away when SurrSel is disabled.
If no text is selected, the shortcut does the expecting jumping.
Notepad++ v8.4.9 (64-bit) Build time : Jan 27 2023 - 03:11:16 Path : C:\Users\Guest!\Downloads\npp.8.4.9.portable.x64\notepad++.exe Command Line : Admin mode : OFF Local Conf mode : ON Cloud Config : OFF OS Name : Windows 10 Pro (64-bit) OS Version : 21H2 OS Build : 19044.2604 Current ANSI codepage : 1252 Plugins : mimeTools (2.9) NavigateTo (2.4.1) NppConverter (4.5) NppExec (0.8.2) NppExport (0.4) PythonScript (2) SurroundSelection (1.4.1) VisualStudioLineCopy (1.0.0.2) _CustomizeToolbar (5.3)
-
@Neil-Schipper said in SurroundSelection sometimes hijacks shortcut Ctrl+Shift+2:
I (and maybe also dail) would like to know if other people are seeing the same behavior.
Oh, yeah - me too! I never use that key combo though so would probably never have noticed it.
Cheers.
-
This appears to fix it:
diff --git a/src/Main.cpp b/src/Main.cpp index 2b159ef..030e2db 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -77,8 +77,11 @@ static void prepareKeyboardChars() { kbProcessChars.clear(); // Default characters - for (UCHAR c : "\"'(){}[]<>`") + const char *defaultChars = "\"'(){}[]<>`"; + for (unsigned i = 0; defaultChars[i]; i++) { + UCHAR c = (UCHAR)defaultChars[i]; processChars[c] = TRUE; + } // Add user defined for (SIZE_T i = 0, j = _tcslen(addChars); i < j; i++)
Explanation and patched binaries here.
-
@rdipardo Thanks for the prompt attention. As it turns out I can’t test the fix for a day or a few (due to: house sitting, guest account, Norton prevents extracting dll from downloaded zip).
-
Norton prevents extracting dll from downloaded zip).
If anyone visiting this thread is in similar circumstances, AppVeyor artifacts will be online until about MAR-28-2023: