Skip to content

Commit 1ace453

Browse files
committed
Fix b:qf_isLoc for empty location list
Previously with `call setloclist(0, []) | lopen` it would be set to 0.
1 parent 4026bbc commit 1ace453

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

after/ftplugin/qf.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ set nobuflisted
3434
let b:undo_ftplugin .= "| setl wrap< rnu< nu< bl<"
3535

3636
" are we in a location list or a quickfix list?
37-
let b:qf_isLoc = !empty(getloclist(0))
37+
if has('patch-7.4.2215')
38+
let b:qf_isLoc = getwininfo(win_getid())[0].loclist
39+
else
40+
let b:qf_isLoc = !empty(getloclist(0))
41+
endif
3842

3943
" customize the statusline
4044
if exists("g:qf_statusline")

0 commit comments

Comments
 (0)