diff options
author | Gabriel Cruz <gabs.oficial98@gmail.com> | 2019-04-12 03:19:26 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-12 03:20:05 +0200 |
commit | 3b7a4f233bd53eb901904992227be3fffe5e621a (patch) | |
tree | 7004730d7689444cb637d0073fd8f01c7a7d2c17 /src | |
parent | e11a9d351a9f0ae278755e3c18bcc9aab05c1266 (diff) | |
download | rneovim-3b7a4f233bd53eb901904992227be3fffe5e621a.tar.gz rneovim-3b7a4f233bd53eb901904992227be3fffe5e621a.tar.bz2 rneovim-3b7a4f233bd53eb901904992227be3fffe5e621a.zip |
vim-patch:8.0.0714: cmdline redraw during timer #9835
vim-patch:8.0.0714: when a timer causes a command line redraw " goes missing
Problem: When a timer causes a command line redraw the " that is displayed
for CTRL-R goes missing.
Solution: Remember an extra character to display.
https://github.com/vim/vim/commit/a92522fbf3a49d06e08caf010f7d7b0f58d2e131
vim-patch:8.0.0720: unfinished mapping not displayed when running timer
Problem: Unfinished mapping not displayed when running timer.
Solution: Also use the extra_char while waiting for a mapping and digraph.
(closes vim/vim#1844)
https://github.com/vim/vim/commit/6a77d2667e982655f6adacee774ee7aa2581bd8a
close #9835
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_getln.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 327a1c4368..3de7204fde 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -1447,6 +1447,9 @@ static int command_line_handle_key(CommandLineState *s) && ccline.cmdbuff[ccline.cmdpos - 1] != ' '); set_cmdspos_cursor(); + if (ccline.special_char != NUL) { + putcmdline(ccline.special_char, ccline.special_shift); + } return command_line_not_changed(s); @@ -1704,6 +1707,7 @@ static int command_line_handle_key(CommandLineState *s) putcmdline('^', true); s->c = get_literal(); // get next (two) character(s) s->do_abbr = false; // don't do abbreviation now + ccline.special_char = NUL; // may need to remove ^ when composing char was typed if (enc_utf8 && utf_iscomposing(s->c) && !cmd_silent) { if (ui_has(kUICmdline)) { @@ -1721,6 +1725,7 @@ static int command_line_handle_key(CommandLineState *s) s->ignore_drag_release = true; putcmdline('?', true); s->c = get_digraph(true); + ccline.special_char = NUL; if (s->c != NUL) { break; @@ -3082,15 +3087,13 @@ void putcmdline(int c, int shift) draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos); } msg_no_more = false; - } else { - ccline.special_char = c; - ccline.special_shift = shift; - if (ccline.redraw_state != kCmdRedrawAll) { + } else if (ccline.redraw_state != kCmdRedrawAll) { ui_call_cmdline_special_char(cchar_to_string((char)(c)), shift, ccline.level); - } } cursorcmd(); + ccline.special_char = c; + ccline.special_shift = shift; ui_cursor_shape(); } @@ -3108,6 +3111,7 @@ void unputcmdline(void) } msg_no_more = false; cursorcmd(); + ccline.special_char = NUL; ui_cursor_shape(); } @@ -3468,6 +3472,10 @@ void redrawcmd(void) set_cmdspos_cursor(); + if (ccline.special_char != NUL) { + putcmdline(ccline.special_char, ccline.special_shift); + } + /* * An emsg() before may have set msg_scroll. This is used in normal mode, * in cmdline mode we can reset them now. |