patch 8.1.1136: decoding of mouse click escape sequence is not tested
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.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 88d03ee..e37fdfb 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10487,12 +10487,15 @@
exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop UNUSED)
{
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)
- || (use_vpeekc && vpeekc() != NUL))
+ || (use_vpeekc && (c = vpeekc()) != NUL && c != Ctrl_C))
&& !got_int)
{
update_topline_cursor();