From 2164c403ed6bb18d51a1a9c41f956e1a8ecdd3e3 Mon Sep 17 00:00:00 2001 From: ichizok Date: Fri, 4 Aug 2017 10:49:19 +0900 Subject: [PATCH 1/2] Prevent an extra character is inserted Changing GUI focus by system() in timer callback and then entering command line mode, an extra character is inserted to command line. --- src/ex_cmds2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 18930a6cfb2676..000129c0f32f85 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1272,7 +1272,10 @@ check_due_timer(void) } if (did_one) + { redraw_after_callback(need_update_screen); + typebuf_was_filled = TRUE; + } return current_id != last_timer_id ? 1 : next_due; } From dcff1d514a307ba656b7052ccf035f736209049f Mon Sep 17 00:00:00 2001 From: ichizok Date: Sun, 27 Aug 2017 16:39:42 +0900 Subject: [PATCH 2/2] Check condition 'typebuf.tb_len > 0' --- src/ex_cmds2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 000129c0f32f85..ae7d9f6793d9c7 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1274,7 +1274,8 @@ check_due_timer(void) if (did_one) { redraw_after_callback(need_update_screen); - typebuf_was_filled = TRUE; + if (typebuf.tb_len > 0) + typebuf_was_filled = TRUE; } return current_id != last_timer_id ? 1 : next_due;