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

@ -187,8 +187,8 @@ syntax errors: >
let g:syntastic_enable_signs=1
<
*'syntastic_error_symbol'* *'syntastic_style_error_symbol'*
*'syntastic_warning_symbol'* *'syntastic_style_warning_symbol'*
*'syntastic_error_symbol'* *'syntastic_style_error_symbol'*
*'syntastic_warning_symbol'* *'syntastic_style_warning_symbol'*
Use this option to control what the syntastic |:sign| text contains. Several
error symobls can be customized:
syntastic_error_symbol - For syntax errors, defaults to '>>'
@ -209,7 +209,7 @@ when the mouse is hovered over erroneous lines: >
<
Note that vim must be compiled with |+balloon_eval|.
*'syntastic_enable_highlighting'*
*'syntastic_enable_highlighting'*
Default: 1
Use this option to tell syntastic whether to use syntax highlighting to mark
errors (where possible). Highlighting can be turned off with the following >
@ -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