Adds an option "syntastic_allow_quit".
This commit is contained in:
parent
bdc9886b7c
commit
63ec78cfb1
@ -208,7 +208,7 @@ errors (where possible). Highlighting can be turned off with the following >
|
||||
let g:syntastic_enable_highlighting = 0
|
||||
<
|
||||
|
||||
*'g:syntastic_always_populate_loc_list'*
|
||||
*'syntastic_always_populate_loc_list'*
|
||||
Default: 0
|
||||
Enable this option to tell syntastic to always stick any detected errors into
|
||||
the loclist: >
|
||||
@ -221,6 +221,18 @@ when saving or opening a file: >
|
||||
let g:syntastic_auto_jump=1
|
||||
<
|
||||
|
||||
*'syntastic_allow_quit'*
|
||||
Default: 1
|
||||
When the |location-list| is open and you quit a buffer, syntastic attempts to
|
||||
detect if this is the last active buffer, and quit Vim if it is. This is
|
||||
usually what you want, but in that situation Vim will also abandon any hidden
|
||||
buffers, thus potentially destroying a carefully crafted session. Use this
|
||||
variable to prevent syntastic from quitting Vim.
|
||||
|
||||
When |syntastic_allow_quit| is 0 syntastic will never issue a 'quit' command: >
|
||||
let g:syntastic_allow_quit=0
|
||||
<
|
||||
|
||||
*'syntastic_auto_loc_list'*
|
||||
Default: 2
|
||||
Use this option to tell syntastic to automatically open and/or close the
|
||||
|
@ -40,6 +40,10 @@ if !exists("g:syntastic_check_on_open")
|
||||
let g:syntastic_check_on_open = 0
|
||||
endif
|
||||
|
||||
if !exists("g:syntastic_allow_quit")
|
||||
let g:syntastic_allow_quit = 1
|
||||
endif
|
||||
|
||||
if !exists("g:syntastic_loc_list_height")
|
||||
let g:syntastic_loc_list_height = 10
|
||||
endif
|
||||
|
@ -147,7 +147,9 @@ endfunction
|
||||
|
||||
function! g:SyntasticLoclistHide()
|
||||
if len(filter( range(1, bufnr('$')), 'syntastic#util#bufIsActive(v:val)' )) == 1
|
||||
quit
|
||||
if g:syntastic_allow_quit
|
||||
quit
|
||||
endif
|
||||
else
|
||||
lclose
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user