mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
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.a92522fbf3
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)6a77d2667e
close #9835
This commit is contained in:

committed by
Justin M. Keyes

parent
e11a9d351a
commit
3b7a4f233b
@@ -1447,6 +1447,9 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
&& ccline.cmdbuff[ccline.cmdpos - 1] != ' ');
|
&& ccline.cmdbuff[ccline.cmdpos - 1] != ' ');
|
||||||
|
|
||||||
set_cmdspos_cursor();
|
set_cmdspos_cursor();
|
||||||
|
if (ccline.special_char != NUL) {
|
||||||
|
putcmdline(ccline.special_char, ccline.special_shift);
|
||||||
|
}
|
||||||
|
|
||||||
return command_line_not_changed(s);
|
return command_line_not_changed(s);
|
||||||
|
|
||||||
@@ -1704,6 +1707,7 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
putcmdline('^', true);
|
putcmdline('^', true);
|
||||||
s->c = get_literal(); // get next (two) character(s)
|
s->c = get_literal(); // get next (two) character(s)
|
||||||
s->do_abbr = false; // don't do abbreviation now
|
s->do_abbr = false; // don't do abbreviation now
|
||||||
|
ccline.special_char = NUL;
|
||||||
// may need to remove ^ when composing char was typed
|
// may need to remove ^ when composing char was typed
|
||||||
if (enc_utf8 && utf_iscomposing(s->c) && !cmd_silent) {
|
if (enc_utf8 && utf_iscomposing(s->c) && !cmd_silent) {
|
||||||
if (ui_has(kUICmdline)) {
|
if (ui_has(kUICmdline)) {
|
||||||
@@ -1721,6 +1725,7 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
s->ignore_drag_release = true;
|
s->ignore_drag_release = true;
|
||||||
putcmdline('?', true);
|
putcmdline('?', true);
|
||||||
s->c = get_digraph(true);
|
s->c = get_digraph(true);
|
||||||
|
ccline.special_char = NUL;
|
||||||
|
|
||||||
if (s->c != NUL) {
|
if (s->c != NUL) {
|
||||||
break;
|
break;
|
||||||
@@ -3082,15 +3087,13 @@ void putcmdline(int c, int shift)
|
|||||||
draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos);
|
draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos);
|
||||||
}
|
}
|
||||||
msg_no_more = false;
|
msg_no_more = false;
|
||||||
} else {
|
} else if (ccline.redraw_state != kCmdRedrawAll) {
|
||||||
ccline.special_char = c;
|
|
||||||
ccline.special_shift = shift;
|
|
||||||
if (ccline.redraw_state != kCmdRedrawAll) {
|
|
||||||
ui_call_cmdline_special_char(cchar_to_string((char)(c)), shift,
|
ui_call_cmdline_special_char(cchar_to_string((char)(c)), shift,
|
||||||
ccline.level);
|
ccline.level);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
cursorcmd();
|
cursorcmd();
|
||||||
|
ccline.special_char = c;
|
||||||
|
ccline.special_shift = shift;
|
||||||
ui_cursor_shape();
|
ui_cursor_shape();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3108,6 +3111,7 @@ void unputcmdline(void)
|
|||||||
}
|
}
|
||||||
msg_no_more = false;
|
msg_no_more = false;
|
||||||
cursorcmd();
|
cursorcmd();
|
||||||
|
ccline.special_char = NUL;
|
||||||
ui_cursor_shape();
|
ui_cursor_shape();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3468,6 +3472,10 @@ void redrawcmd(void)
|
|||||||
|
|
||||||
set_cmdspos_cursor();
|
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,
|
* An emsg() before may have set msg_scroll. This is used in normal mode,
|
||||||
* in cmdline mode we can reset them now.
|
* in cmdline mode we can reset them now.
|
||||||
|
@@ -975,8 +975,6 @@ describe('Expressions coloring support', function()
|
|||||||
]])
|
]])
|
||||||
funcs.setreg('a', {'\192'})
|
funcs.setreg('a', {'\192'})
|
||||||
feed('<C-r>="<C-r><C-r>a"<C-r><C-r>a"foo"')
|
feed('<C-r>="<C-r><C-r>a"<C-r><C-r>a"foo"')
|
||||||
-- TODO(ZyX-I): Parser highlighting should not override special character
|
|
||||||
-- highlighting.
|
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
|
|
|
||||||
{EOB:~ }|
|
{EOB:~ }|
|
||||||
@@ -985,7 +983,7 @@ describe('Expressions coloring support', function()
|
|||||||
{EOB:~ }|
|
{EOB:~ }|
|
||||||
{EOB:~ }|
|
{EOB:~ }|
|
||||||
{EOB:~ }|
|
{EOB:~ }|
|
||||||
={SQ:"}{SB:<c0>}{SQ:"}{E:<c0>"}{SB:foo}{E:"}^ |
|
={SQ:"}{SB:<c0>}{SQ:"}{E:<c0>"}{SB:foo}{E:"}^" |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user