diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-05-01 18:47:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-05-01 18:47:59 +0200 |
commit | b2ac14c0b5e23f8ab97c5c784bcd83e13ba8ded3 (patch) | |
tree | ccd71c85b849644e14fdbb4f85d2658542443dee /src/ex_docmd.c | |
parent | 8a938af6ddefab4b4bc751d3f3545e1d95622c8a (diff) |
patch 8.0.1786: no test for 'termwinkey'v8.0.1786
Problem: No test for 'termwinkey'.
Solution: Add a test. Make feedkeys() handle terminal_loop() returning
before characters are consumed.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 66d2ad6d7b..0e2edd65b2 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -10340,7 +10340,21 @@ exec_normal(int was_typed) && typebuf.tb_len > 0)) && !got_int) { update_topline_cursor(); - normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */ +#ifdef FEAT_TERMINAL + if (term_use_loop() + && oa.op_type == OP_NOP && oa.regname == NUL + && !VIsual_active) + { + /* If terminal_loop() returns OK we got a key that is handled + * in Normal model. With FAIL we first need to position the + * cursor and the screen needs to be redrawn. */ + if (terminal_loop(TRUE) == OK) + normal_cmd(&oa, TRUE); + } + else +#endif + /* execute a Normal mode cmd */ + normal_cmd(&oa, TRUE); } } |