Skip to content

Commit 26bb22d

Browse files
authored
Merge pull request #82 from stkid/preview_locallist
support preview in locallist
2 parents bd34478 + 11ad5c5 commit 26bb22d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/quickui/tools.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ function! quickui#tools#preview_quickfix(...)
275275
let obj.version = -1
276276
endif
277277
if b:changedtick != obj.version
278-
let obj.items = getqflist()
278+
if getwininfo(win_getid())[0].loclist != 0
279+
let obj.items = getloclist(0)
280+
else
281+
let obj.items = getqflist()
282+
endif
279283
let obj.version = b:changedtick
280284
endif
281285
let index = (a:0 > 0)? a:1 : line('.')

0 commit comments

Comments
 (0)