GUIs: redraw screen after sign update

Some GUIs (MacVim, gVim) wouldn't show placed signs after updating. Force a
redraw.

References #228.
This commit is contained in:
Marco Hinz 2017-02-20 01:15:50 +01:00
parent 40deeb3fdf
commit 2778fd928c
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -189,6 +189,12 @@ function! sy#sign#process_diff(sy, diff) abort
execute 'sign unplace' a:sy.internal[line].id 'buffer='.a:sy.buffer
endfor
if has('gui_running') && has('patch-7.4.1967')
" Some GUIs need this extra kick in the butt, when setting signs from the
" exit handler. :redraw would trigger a "hanging cursor bug" in MacVim.
call feedkeys("\<c-l>")
endif
let a:sy.stats = [added, modified, deleted]
endfunction