]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4846: termcodes test fails v8.2.4846
authorzeertzjq <zeertzjq@outlook.com>
Fri, 29 Apr 2022 15:44:00 +0000 (16:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 29 Apr 2022 15:44:00 +0000 (16:44 +0100)
Problem:    Termcodes test fails.
Solution:   use CTRL-SHIFT-V to insert an unsimplified key. (closes #10316)

runtime/doc/cmdline.txt
src/edit.c
src/getchar.c
src/testdir/test_gui.vim
src/version.c

index 2ef09fa5b8490df101d135f72b9897cd362280ce..8b491345aa34435e6c569767189f486679d40904 100644 (file)
@@ -87,6 +87,7 @@ CTRL-Q                Same as CTRL-V.  But with some terminals it is used for
 CTRL-SHIFT-V                           *c_CTRL-SHIFT-V* *c_CTRL-SHIFT-Q*
 CTRL-SHIFT-Q   Works just like CTRL-V, unless |modifyOtherKeys| is active,
                then it inserts the Escape sequence for a key with modifiers.
+               In the GUI the |key-notation| is inserted without simplifying.
 
                                                        *c_<Left>* *c_Left*
 <Left>         cursor left
index 3790bfb5d6785e826051306c55b74b7e1b604e87..61c16948362f69e7cf0998d4863ddbc0328ffd0d 100644 (file)
@@ -1899,7 +1899,11 @@ get_literal(int noReduceKeys)
      * vi-compatible (maybe there should be an option for it?) -- webb
      */
     if (gui.in_use)
+    {
        ++allow_keys;
+       if (noReduceKeys)
+           ++no_reduce_keys;
+    }
 #endif
 #ifdef USE_ON_FLY_SCROLL
     dont_scroll = TRUE;                // disallow scrolling here
@@ -1992,7 +1996,11 @@ get_literal(int noReduceKeys)
     --no_mapping;
 #ifdef FEAT_GUI
     if (gui.in_use)
+    {
        --allow_keys;
+       if (noReduceKeys)
+           --no_reduce_keys;
+    }
 #endif
     if (nc)
     {
index 6d8697c376ab58364ede4957166b3a9c0f4a3879..2b1bbde4b0da20701742afd4111535dcf98d857a 100644 (file)
@@ -1634,7 +1634,7 @@ merge_modifyOtherKeys(int c_arg, int *modifiers)
 {
     int c = c_arg;
 
-    if ((*modifiers & MOD_MASK_CTRL) && !(*modifiers & MOD_MASK_SHIFT))
+    if (*modifiers & MOD_MASK_CTRL)
     {
        if ((c >= '`' && c <= 0x7f) || (c >= '@' && c <= '_'))
        {
index 96723b668e1ca335d3e2835e2909fdf934a92798..993954b5a16ceb2aef656421725ad1d7f257c01e 100644 (file)
@@ -1560,8 +1560,8 @@ func Test_gui_findrepl()
   bw!
 endfunc
 
-func Test_gui_CTRL_V()
-  call feedkeys(":let g:str = '\<C-V>\<*C-S-I>\<C-V>\<*C-S-@>'\<CR>", 'tx')
+func Test_gui_CTRL_SHIFT_V()
+  call feedkeys(":let g:str = '\<*C-S-V>\<*C-S-I>\<*C-S-V>\<*C-S-@>'\<CR>", 'tx')
   call assert_equal('<C-S-I><C-S-@>', g:str)
   unlet g:str
 endfunc
index dc2c1ff3f1a65d80434c1f6ccfffdf5d4ae9bd0b..eddc6c96a3b59bf60b7f5b5a7e423e49143691fe 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4846,
 /**/
     4845,
 /**/