add syntastic_loc_list_height option

This allows the user to specify what height the loc list should be
opened at. Solves  issue #153.
This commit is contained in:
Martin Grenfell 2012-02-10 17:56:32 +00:00
parent 5e438933f3
commit 9a6895d28d
2 changed files with 13 additions and 1 deletions

View File

@ -203,6 +203,14 @@ detected, but not opened automatically. >
let g:syntastic_auto_loc_list=2
<
*'syntastic_loc_list_height'*
Default: 10
Use this option to specify the height of the location lists that syntastic
opens. >
let g:syntastic_loc_list_height=5
<
*'syntastic_mode_map'*
Default: { "mode": "active",
"active_filetypes": [],

View File

@ -81,6 +81,10 @@ if !exists("g:syntastic_check_on_open")
let g:syntastic_check_on_open = 0
endif
if !exists("g:syntastic_loc_list_height")
let g:syntastic_loc_list_height = 10
endif
command! SyntasticToggleMode call s:ToggleMode()
command! SyntasticCheck call s:UpdateErrors(0) <bar> redraw!
command! Errors call s:ShowLocList()
@ -340,7 +344,7 @@ endfunction
function! s:ShowLocList()
if !empty(s:LocList())
let num = winnr()
lopen
exec "lopen " . g:syntastic_loc_list_height
if num != winnr()
wincmd p
endif