From e6482164f89c9cf7916646fead237a3841ff2461 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Thu, 15 Aug 2013 21:24:57 +0300 Subject: [PATCH] Fix setting title of the error window. Sadly this is slow. --- plugin/syntastic/loclist.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/syntastic/loclist.vim b/plugin/syntastic/loclist.vim index 104470dc..f1f34eb6 100644 --- a/plugin/syntastic/loclist.vim +++ b/plugin/syntastic/loclist.vim @@ -157,11 +157,17 @@ function! g:SyntasticLoclist.show() endif " try to find the loclist window and set w:quickfix_title + let errors = getloclist(0) for buf in tabpagebuflist() if buflisted(buf) && bufloaded(buf) && getbufvar(buf, '&buftype') ==# 'quickfix' let win = bufwinnr(buf) let title = getwinvar(win, 'quickfix_title') - if title ==# ':setloclist()' || strpart(title, 0, 16) ==# ':SyntasticCheck ' + + " TODO: try to make sure we actually own this window; sadly, + " errors == getloclist(0) is the only somewhat safe way to + " achieve that + if strpart(title, 0, 16) ==# ':SyntasticCheck ' || + \ ( (title == '' || title ==# ':setloclist()') && errors == getloclist(0) ) call setwinvar(win, 'quickfix_title', ':SyntasticCheck ' . self._name) endif endif