From 4c22406e28e140d8591598cfba64124721392d39 Mon Sep 17 00:00:00 2001 From: Micha Moskovic Date: Tue, 25 Nov 2014 16:32:46 +0100 Subject: [PATCH] Improve Quickfix window detection When using a non-english locale, the name of the Quickfix window can change, making the detection of Quickfix vs Location list fail. E.g., my locale is set to italian and the Quickfix window's name is `[Lista Quickfix]` rather than `[Quickfix List]`. This change generalizes the pattern used to detect the Quickfix window. --- autoload/airline/extensions/quickfix.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/quickfix.vim b/autoload/airline/extensions/quickfix.vim index 8efc527..2be4077 100644 --- a/autoload/airline/extensions/quickfix.vim +++ b/autoload/airline/extensions/quickfix.vim @@ -25,7 +25,7 @@ function! s:get_text() let nr = bufnr('%') for buf in split(buffers, '\n') if match(buf, '\v^\s*'.nr) > -1 - if match(buf, '\[Quickfix List\]') > -1 + if match(buf, '\cQuickfix') > -1 return g:airline#extensions#quickfix#quickfix_text else return g:airline#extensions#quickfix#location_text