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)
fa5612c7d8
This commit is contained in:
Jan Edmund Lazo
2019-12-30 00:47:32 -05:00
parent 5fc8a7ee09
commit 78aa41354e

View File

@@ -874,8 +874,10 @@ static void normal_finish_command(NormalState *s)
s->old_mapped_len = typebuf_maplen(); s->old_mapped_len = typebuf_maplen();
} }
// If an operation is pending, handle it... // If an operation is pending, handle it. But not for K_IGNORE.
do_pending_operator(&s->ca, s->old_col, false); 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 // Wait for a moment when a message is displayed that will be overwritten
// by the mode message. // by the mode message.