From 78aa41354ea9b6bb2d6ce750f02f0f8b3d7d4418 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 30 Dec 2019 00:47:32 -0500 Subject: vim-patch:8.1.2377: GUI: when losing focus a pending operator is executed Problem: GUI: when losing focus a pending operator is executed. Solution: Do not execute an operator when getting K_IGNORE. (closes vim/vim#5300) https://github.com/vim/vim/commit/fa5612c7d836eb789e0f8ff4b10461b8640a14b2 --- src/nvim/normal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 9c5434a0dd..9c707a6fdc 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -874,8 +874,10 @@ static void normal_finish_command(NormalState *s) s->old_mapped_len = typebuf_maplen(); } - // If an operation is pending, handle it... - do_pending_operator(&s->ca, s->old_col, false); + // If an operation is pending, handle it. But not for K_IGNORE. + if (s->ca.cmdchar != K_IGNORE) { + do_pending_operator(&s->ca, s->old_col, false); + } // Wait for a moment when a message is displayed that will be overwritten // by the mode message. -- cgit