diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-02-13 13:00:54 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-02-13 13:00:54 +1300 |
commit | d10451c066decb07581e6cbc4d11021d0d856fe1 (patch) | |
tree | 3c76cac833fef11e4a2e030bb8da6752a9883da3 | |
parent | Merge branch 'hotfix/v3.1.1' into develop (diff) | |
download | vim-insert-cancel-d10451c066decb07581e6cbc4d11021d0d856fe1.tar.gz vim-insert-cancel-d10451c066decb07581e6cbc4d11021d0d856fe1.zip |
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.
-rw-r--r-- | plugin/insert_cancel.vim | 3 |
1 files changed, 3 insertions, 0 deletions
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 |