Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add syntastic_always_populate_loc_list option

We dont want to set the loc list by default since syntastic isnt the
only plugin using loclists - and we dont want to clobber other peoples
loclists.

This option allows the user to override this behaviour if it suits their
workflow.
  • Loading branch information...
commit 5dfde8e1510956259c72beda1df562405a121765 1 parent 6193c99
@scrooloose authored
Showing with 14 additions and 0 deletions.
  1. +6 −0 doc/syntastic.txt
  2. +8 −0 plugin/syntastic.vim
View
6 doc/syntastic.txt
@@ -201,6 +201,12 @@ errors (where possible). Highlighting can be turned off with the following >
let g:syntastic_enable_highlighting = 0
<
+ *'g:syntastic_always_populate_loc_list'*
+Default: 0
+Enable this option to tell syntastic to always stick any detected errors into
+the loclist: >
+ let g:syntastic_always_populate_loc_list=1
+<
*'syntastic_auto_jump'*
Default: 0
Enable this option if you want the cursor to jump to the first detected error
View
8 plugin/syntastic.vim
@@ -69,6 +69,10 @@ if !exists("g:syntastic_auto_loc_list")
let g:syntastic_auto_loc_list = 2
endif
+if !exists("g:syntastic_always_populate_loc_list")
+ let g:syntastic_always_populate_loc_list = 0
+endif
+
if !exists("g:syntastic_auto_jump")
let syntastic_auto_jump=0
endif
@@ -166,6 +170,10 @@ function! s:UpdateErrors(auto_invoked, ...)
endif
let loclist = s:LocList()
+ if g:syntastic_always_populate_loc_list && loclist.hasErrorsOrWarningsToDisplay()
+ call setloclist(0, loclist.toRaw())
+ endif
+
if g:syntastic_auto_jump && loclist.hasErrorsOrWarningsToDisplay()
call setloclist(0, loclist.toRaw())
silent! ll
Please sign in to comment.
Something went wrong with that request. Please try again.