From 1ace45375ccda7233dfdd97b550eb45b32c2cb9a Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 20 Nov 2018 13:44:01 +0100 Subject: [PATCH] Fix b:qf_isLoc for empty location list Previously with `call setloclist(0, []) | lopen` it would be set to 0. --- after/ftplugin/qf.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/after/ftplugin/qf.vim b/after/ftplugin/qf.vim index c0f7632..3021678 100644 --- a/after/ftplugin/qf.vim +++ b/after/ftplugin/qf.vim @@ -34,7 +34,11 @@ set nobuflisted let b:undo_ftplugin .= "| setl wrap< rnu< nu< bl<" " are we in a location list or a quickfix list? -let b:qf_isLoc = !empty(getloclist(0)) +if has('patch-7.4.2215') + let b:qf_isLoc = getwininfo(win_getid())[0].loclist +else + let b:qf_isLoc = !empty(getloclist(0)) +endif " customize the statusline if exists("g:qf_statusline")