comparison src/ex_getln.c @ 18717:14d2a210fab1 v8.1.2350

patch 8.1.2350: other text for CTRL-V in Insert mode with modifyOtherKeys Commit: https://github.com/vim/vim/commit/fc4ea2a72d36de1196a3ce17352e72f8fe90f4bb Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 26 19:33:22 2019 +0100 patch 8.1.2350: other text for CTRL-V in Insert mode with modifyOtherKeys Problem: Other text for CTRL-V in Insert mode with modifyOtherKeys. Solution: Convert the Escape sequence back to key as if modifyOtherKeys is not set, and use CTRL-SHIFT-V to get the Escape sequence itself. (closes #5254)
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Nov 2019 19:45:04 +0100
parents ac08c7ad9d37
children 8f05b3cf8557
comparison
equal deleted inserted replaced
18716:9568bc68c45d 18717:14d2a210fab1
2206 break; 2206 break;
2207 #endif 2207 #endif
2208 2208
2209 case Ctrl_V: 2209 case Ctrl_V:
2210 case Ctrl_Q: 2210 case Ctrl_Q:
2211 ignore_drag_release = TRUE; 2211 {
2212 putcmdline('^', TRUE); 2212 int prev_mod_mask = mod_mask;
2213 c = get_literal(); /* get next (two) character(s) */ 2213
2214 do_abbr = FALSE; /* don't do abbreviation now */ 2214 ignore_drag_release = TRUE;
2215 extra_char = NUL; 2215 putcmdline('^', TRUE);
2216 /* may need to remove ^ when composing char was typed */ 2216 c = get_literal(); // get next (two) character(s)
2217 if (enc_utf8 && utf_iscomposing(c) && !cmd_silent) 2217 do_abbr = FALSE; // don't do abbreviation now
2218 { 2218 extra_char = NUL;
2219 draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos); 2219 // may need to remove ^ when composing char was typed
2220 msg_putchar(' '); 2220 if (enc_utf8 && utf_iscomposing(c) && !cmd_silent)
2221 cursorcmd(); 2221 {
2222 } 2222 draw_cmdline(ccline.cmdpos,
2223 ccline.cmdlen - ccline.cmdpos);
2224 msg_putchar(' ');
2225 cursorcmd();
2226 }
2227
2228 if ((c == ESC || c == CSI)
2229 && !(prev_mod_mask & MOD_MASK_SHIFT))
2230 // Using CTRL-V: Change any modifyOtherKeys ESC
2231 // sequence to a normal key. Don't do this for
2232 // CTRL-SHIFT-V.
2233 c = decodeModifyOtherKeys(c);
2234 }
2235
2223 break; 2236 break;
2224 2237
2225 #ifdef FEAT_DIGRAPHS 2238 #ifdef FEAT_DIGRAPHS
2226 case Ctrl_K: 2239 case Ctrl_K:
2227 ignore_drag_release = TRUE; 2240 ignore_drag_release = TRUE;