New knob: g:syntastic_full_redraws.

This commit is contained in:
LCD 47 2013-07-11 10:04:26 +03:00
parent bc6ca26f68
commit 90259bde00
2 changed files with 17 additions and 6 deletions

View File

@ -348,6 +348,13 @@ statusline: >
If the buffer had 2 warnings, starting on line 5 then this would appear: >
[Warn: 5 #2]
<
*'syntastic_full_redraws'*
Default: 0 in GUI Vim and MacVim, 1 otherwise
Controls whether syntastic calls |:redraw| or |:redraw!| for screen redraws.
Changing it can in principle make screen redraws smoother, but it can also
cause screen flicker, or ghost characters. Leaving it to the default should
be safe.
*'syntastic_debug'*
Default: 0
Set this to 1 to enable debugging: >

View File

@ -56,6 +56,10 @@ if !exists("g:syntastic_filetype_map")
let g:syntastic_filetype_map = {}
endif
if !exists("g:syntastic_full_redraws")
let g:syntastic_full_redraws = !( has('gui_running') || has('gui_macvim'))
endif
let s:registry = g:SyntasticRegistry.Instance()
let s:notifiers = g:SyntasticNotifiers.Instance()
let s:modemap = g:SyntasticModeMap.Instance()
@ -229,10 +233,10 @@ endfunction
"However, on some versions of gvim using `redraw!` causes the screen to
"flicker - so use redraw.
function! s:Redraw()
if has('gui_running') || has('gui_macvim')
redraw
else
if g:syntastic_full_redraws
redraw!
else
redraw
endif
endfunction