mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.1210: CTRL-G and CTRL-T are ignored with typeahead
Problem: When typing a search pattern CTRL-G and CTRL-T are ignored when there is typeahead. Solution: Don't pass SEARCH_PEEK and don't call char_avail(). (haya14busa, closes #2233)
This commit is contained in:
@@ -158,6 +158,20 @@ trigger_cmd_autocmd(int typechar, int evt)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Abandon the command line.
|
||||
*/
|
||||
static void
|
||||
abandon_cmdline(void)
|
||||
{
|
||||
vim_free(ccline.cmdbuff);
|
||||
ccline.cmdbuff = NULL;
|
||||
if (msg_scrolled == 0)
|
||||
compute_cmdrow();
|
||||
MSG("");
|
||||
redraw_cmdline = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* getcmdline() - accept a command line starting with firstc.
|
||||
*
|
||||
@@ -1702,11 +1716,8 @@ getcmdline(
|
||||
if (p_is && !cmd_silent && (firstc == '/' || firstc == '?'))
|
||||
{
|
||||
pos_T t;
|
||||
int search_flags = SEARCH_KEEP + SEARCH_NOOF
|
||||
+ SEARCH_PEEK;
|
||||
int search_flags = SEARCH_KEEP + SEARCH_NOOF;
|
||||
|
||||
if (char_avail())
|
||||
continue;
|
||||
cursor_off();
|
||||
out_flush();
|
||||
if (c == Ctrl_G)
|
||||
@@ -2083,15 +2094,8 @@ returncmd:
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gotesc) /* abandon command line */
|
||||
{
|
||||
vim_free(ccline.cmdbuff);
|
||||
ccline.cmdbuff = NULL;
|
||||
if (msg_scrolled == 0)
|
||||
compute_cmdrow();
|
||||
MSG("");
|
||||
redraw_cmdline = TRUE;
|
||||
}
|
||||
if (gotesc)
|
||||
abandon_cmdline();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user