changeset 28644:0c63014c2513 v8.2.4846

patch 8.2.4846: termcodes test fails Commit: https://github.com/vim/vim/commit/bad8a013c238595aa206690210eb1367fbc878f9 Author: zeertzjq <zeertzjq@outlook.com> Date: Fri Apr 29 16:44:00 2022 +0100 patch 8.2.4846: termcodes test fails Problem: Termcodes test fails. Solution: use CTRL-SHIFT-V to insert an unsimplified key. (closes https://github.com/vim/vim/issues/10316)
author Bram Moolenaar <Bram@vim.org>
date Fri, 29 Apr 2022 17:45:03 +0200
parents 5be5151ad510
children a9eca6be0c8c
files runtime/doc/cmdline.txt src/edit.c src/getchar.c src/testdir/test_gui.vim src/version.c
diffstat 5 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -87,6 +87,7 @@ CTRL-Q		Same as CTRL-V.  But with some t
 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
--- a/src/edit.c
+++ b/src/edit.c
@@ -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)
     {
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1634,7 +1634,7 @@ merge_modifyOtherKeys(int c_arg, int *mo
 {
     int c = c_arg;
 
-    if ((*modifiers & MOD_MASK_CTRL) && !(*modifiers & MOD_MASK_SHIFT))
+    if (*modifiers & MOD_MASK_CTRL)
     {
 	if ((c >= '`' && c <= 0x7f) || (c >= '@' && c <= '_'))
 	{
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -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
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4846,
+/**/
     4845,
 /**/
     4844,