From d10451c066decb07581e6cbc4d11021d0d856fe1 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 13 Feb 2019 13:00:54 +1300 Subject: Redraw the screen after cancelling insert There's an apparent bug in recent patches of Vim (after 8.1) that causes 'showmode' display to remain on the screen after an insert operation is cancelled using this plugin. A full `redraw!` fixes it. I'll see if I can figure out what's causing it in Vim itself too, hopefully before an 8.2 release. --- plugin/insert_cancel.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/insert_cancel.vim b/plugin/insert_cancel.vim index 1ec0f91..18bd0ac 100644 --- a/plugin/insert_cancel.vim +++ b/plugin/insert_cancel.vim @@ -48,6 +48,9 @@ function! s:Cancel() silent undo endif + " Redraw the screen to avoid bug with vestigial 'showmode' display + redraw! + endfunction " Set up the hooks described for the functions above, if Vim is new enough to -- cgit v1.2.3