From 8ab26a2268752f769c4eb4c5b4d567651bca6610 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Sun, 11 Sep 2016 12:42:04 +0300 Subject: [PATCH] Bug fix: safer handling of auto_loc_list. --- plugin/syntastic.vim | 4 +--- plugin/syntastic/autoloclist.vim | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index a2874d71..b0cc68c3 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-220' +let g:_SYNTASTIC_VERSION = '3.7.0-221' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 @@ -234,7 +234,6 @@ function! SyntasticReset() abort " {{{2 call s:ClearCache(bufnr('')) call s:notifiers.refresh(g:SyntasticLoclist.New([])) if !empty(get(w:, 'syntastic_loclist_set', [])) - let w:syntastic_loclist_set = [] try " Vim 7.4.2200 or later call setloclist(0, [], 'r', { 'title': '' }) @@ -419,7 +418,6 @@ function! s:UpdateErrors(buf, auto_invoked, checker_names) abort " {{{2 let do_jump = 0 endif - let w:syntastic_loclist_set = [] if syntastic#util#var('always_populate_loc_list') || do_jump call loclist.setloclist(1) if run_checks && do_jump && !loclist.isEmpty() diff --git a/plugin/syntastic/autoloclist.vim b/plugin/syntastic/autoloclist.vim index 463a01c1..9639b2b8 100644 --- a/plugin/syntastic/autoloclist.vim +++ b/plugin/syntastic/autoloclist.vim @@ -29,6 +29,7 @@ function! g:SyntasticAutoloclistNotifier.AutoToggle(loclist) abort " {{{2 "TODO: this will close the loc list window if one was opened by "something other than syntastic call SyntasticLoclistHide() + let w:syntastic_loclist_set = [] endif endif endfunction " }}}2