mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:8.1.1136: decoding of mouse click escape sequence is not tested (#35551)
Problem: Decoding of mouse click escape sequence is not tested.
Solution: Add a test for xterm and SGR using low-level input. Make
low-level input execution with feedkeys() work.
905dd905de
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -332,7 +332,7 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_ks)
|
||||
if (!dangerous) {
|
||||
ex_normal_busy++;
|
||||
}
|
||||
exec_normal(true);
|
||||
exec_normal(true, lowlevel);
|
||||
if (!dangerous) {
|
||||
ex_normal_busy--;
|
||||
}
|
||||
|
@@ -7072,21 +7072,26 @@ void exec_normal_cmd(char *cmd, int remap, bool silent)
|
||||
{
|
||||
// Stuff the argument into the typeahead buffer.
|
||||
ins_typebuf(cmd, remap, 0, true, silent);
|
||||
exec_normal(false);
|
||||
exec_normal(false, false);
|
||||
}
|
||||
|
||||
/// Execute normal_cmd() until there is no typeahead left.
|
||||
///
|
||||
/// @param was_typed whether or not something was typed
|
||||
void exec_normal(bool was_typed)
|
||||
/// @param use_vpeekc true to use vpeekc() to check for available chars
|
||||
void exec_normal(bool was_typed, bool use_vpeekc)
|
||||
{
|
||||
oparg_T oa;
|
||||
int c;
|
||||
|
||||
// When calling vpeekc() from feedkeys() it will return Ctrl_C when there
|
||||
// is nothing to get, so also check for Ctrl_C.
|
||||
clear_oparg(&oa);
|
||||
finish_op = false;
|
||||
while ((!stuff_empty()
|
||||
|| ((was_typed || !typebuf_typed())
|
||||
&& typebuf.tb_len > 0))
|
||||
&& typebuf.tb_len > 0)
|
||||
|| (use_vpeekc && (c = vpeekc()) != NUL && c != Ctrl_C))
|
||||
&& !got_int) {
|
||||
update_topline_cursor();
|
||||
normal_cmd(&oa, true); // execute a Normal mode cmd
|
||||
|
Reference in New Issue
Block a user