From 0be0f9895d527f9e05b7cf2309a0a4cb79b19da3 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 6 May 2021 00:29:50 -0400 Subject: [PATCH] vim-patch:8.2.2832: operator cancelled by moving mouse when using popup Problem: Operator cancelled by moving mouse when using popup. (Sergey Vlasov) Solution: Do not trigger an operator for a mouse move events. (closes vim/vim#8176) https://github.com/vim/vim/commit/1ad72c8eb601d681c84b47380fc31b6d23602d51 --- src/nvim/normal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 616268fcd1..2f4c441beb 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -880,8 +880,9 @@ static void normal_finish_command(NormalState *s) s->old_mapped_len = typebuf_maplen(); } - // If an operation is pending, handle it. But not for K_IGNORE. - if (s->ca.cmdchar != K_IGNORE) { + // If an operation is pending, handle it. But not for K_IGNORE or + // K_MOUSEMOVE. + if (s->ca.cmdchar != K_IGNORE && s->ca.cmdchar != K_MOUSEMOVE) { do_pending_operator(&s->ca, s->old_col, false); }