Mercurial > vim
diff src/ex_docmd.c @ 16263:d3377393e3d9 v8.1.1136
patch 8.1.1136: decoding of mouse click escape sequence is not tested
commit https://github.com/vim/vim/commit/905dd905debfde403b2a18178ccc1f8e118f4f2b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 7 14:21:47 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Apr 2019 14:30:06 +0200 |
parents | cd5c83115ec6 |
children | c1c25e2523a6 |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -10487,12 +10487,15 @@ exec_normal_cmd(char_u *cmd, int remap, 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();