]> granicus.if.org Git - vim/commitdiff
patch 8.2.4730: MS-Windows GUI: cannot use CTRL-/ v8.2.4730
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sun, 10 Apr 2022 11:37:48 +0000 (12:37 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 10 Apr 2022 11:37:48 +0000 (12:37 +0100)
Problem:    MS-Windows GUI: cannot use CTRL-/.
Solution:   Handle the WM_KEYUP event. (Yasuhiro Matsumoto, closes #10141)

src/gui_w32.c
src/version.c

index 584e4ef3e63b0a24e6e568382369372afbf393ba..d1cc06d5b9372918b21bfc09f65f049d3ec3806e 100644 (file)
@@ -4635,6 +4635,20 @@ _WndProc(
        }
        break;
 
+    case WM_KEYUP:
+       // handle CTRL-/
+       if ((GetKeyState(VK_CONTROL) & 0x8000) != 0 && wParam == 0xBF)
+       {
+           char_u string[4];
+
+           string[0] = CSI;
+           string[1] = KS_MODIFIER;
+           string[2] = MOD_MASK_CTRL;
+           string[3] = 0x2F;
+           add_to_input_buf(string, 4);
+       }
+       return 0L;
+
     case WM_CHAR:
        // Don't use HANDLE_MSG() for WM_CHAR, it truncates wParam to a single
        // byte while we want the UTF-16 character value.
index 5bffc85828d833d010b59976afb23665b3b9b749..fdb2e465752025e3672e13d5779415c01f87792b 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4730,
 /**/
     4729,
 /**/