aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-02-13 13:00:54 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-02-13 13:00:54 +1300
commitd10451c066decb07581e6cbc4d11021d0d856fe1 (patch)
tree3c76cac833fef11e4a2e030bb8da6752a9883da3 /plugin
parentMerge branch 'hotfix/v3.1.1' into develop (diff)
downloadvim-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.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/insert_cancel.vim3
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