diff src/ex_getln.c @ 23076:5fbac68bda23 v8.2.2084

patch 8.2.2084: CTRL-V U doesn't work to enter a Unicode character Commit: https://github.com/vim/vim/commit/0684e36a7ee0743f2889698fb8e0e14f7acae423 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 3 19:54:42 2020 +0100 patch 8.2.2084: CTRL-V U doesn't work to enter a Unicode character Problem: CTRL-V U doesn't work to enter a Unicode character when modifyOtherKeys is effective. (Ken Takata) Solution: Add a flag to get_literal() for the shift key. (closes #7413)
author Bram Moolenaar <Bram@vim.org>
date Thu, 03 Dec 2020 20:00:05 +0100
parents 5a7db84713dc
children a84e7abb0c92
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2206,13 +2206,14 @@ getcmdline_int(
 	case Ctrl_V:
 	case Ctrl_Q:
 		{
-		    int	 prev_mod_mask = mod_mask;
-
 		    ignore_drag_release = TRUE;
 		    putcmdline('^', TRUE);
-		    no_reduce_keys = TRUE;  //  don't merge modifyOtherKeys
-		    c = get_literal();	    // get next (two) character(s)
-		    no_reduce_keys = FALSE;
+
+		    // Get next (two) character(s).  Do not change any
+		    // modifyOtherKeys ESC sequence to a normal key for
+		    // CTRL-SHIFT-V.
+		    c = get_literal(mod_mask & MOD_MASK_SHIFT);
+
 		    do_abbr = FALSE;	    // don't do abbreviation now
 		    extra_char = NUL;
 		    // may need to remove ^ when composing char was typed
@@ -2223,13 +2224,6 @@ getcmdline_int(
 			msg_putchar(' ');
 			cursorcmd();
 		    }
-
-		    if ((c == ESC || c == CSI)
-					  && !(prev_mod_mask & MOD_MASK_SHIFT))
-			// Using CTRL-V: Change any modifyOtherKeys ESC
-			// sequence to a normal key.  Don't do this for
-			// CTRL-SHIFT-V.
-			c = decodeModifyOtherKeys(c);
 		}
 
 		break;