mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
ext_cmdline: disable some redraws
This commit is contained in:
@@ -1144,7 +1144,7 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
|
|
||||||
xfree(ccline.cmdbuff); // no commandline to return
|
xfree(ccline.cmdbuff); // no commandline to return
|
||||||
ccline.cmdbuff = NULL;
|
ccline.cmdbuff = NULL;
|
||||||
if (!cmd_silent) {
|
if (!cmd_silent && !ui_is_external(kUICmdline)) {
|
||||||
if (cmdmsg_rl) {
|
if (cmdmsg_rl) {
|
||||||
msg_col = Columns;
|
msg_col = Columns;
|
||||||
} else {
|
} else {
|
||||||
@@ -1596,9 +1596,14 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
s->do_abbr = false; // don't do abbreviation now
|
s->do_abbr = false; // don't do abbreviation now
|
||||||
// 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) {
|
||||||
draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos);
|
if (ui_is_external(kUICmdline)) {
|
||||||
msg_putchar(' ');
|
// TODO(bfredl): why not make unputcmdline also work with true?
|
||||||
cursorcmd();
|
unputcmdline();
|
||||||
|
} else {
|
||||||
|
draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos);
|
||||||
|
msg_putchar(' ');
|
||||||
|
cursorcmd();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2778,22 +2783,19 @@ void putcmdline(int c, int shift)
|
|||||||
ui_cursor_shape();
|
ui_cursor_shape();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Undo a putcmdline(c, FALSE).
|
||||||
* Undo a putcmdline(c, FALSE).
|
|
||||||
*/
|
|
||||||
void unputcmdline(void)
|
void unputcmdline(void)
|
||||||
{
|
{
|
||||||
if (cmd_silent)
|
if (cmd_silent) {
|
||||||
return;
|
return;
|
||||||
msg_no_more = TRUE;
|
}
|
||||||
if (ccline.cmdlen == ccline.cmdpos)
|
msg_no_more = true;
|
||||||
|
if (ccline.cmdlen == ccline.cmdpos && !ui_is_external(kUICmdline)) {
|
||||||
msg_putchar(' ');
|
msg_putchar(' ');
|
||||||
else if (has_mbyte)
|
} else {
|
||||||
draw_cmdline(ccline.cmdpos,
|
draw_cmdline(ccline.cmdpos, mb_ptr2len(ccline.cmdbuff + ccline.cmdpos));
|
||||||
(*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos));
|
}
|
||||||
else
|
msg_no_more = false;
|
||||||
draw_cmdline(ccline.cmdpos, 1);
|
|
||||||
msg_no_more = FALSE;
|
|
||||||
cursorcmd();
|
cursorcmd();
|
||||||
ui_cursor_shape();
|
ui_cursor_shape();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user