Skip to content

Commit e9004ce

Browse files
mvanderkamplbonn
authored andcommitted
Pass empty list to setqflist when setting attrs
The list argument is ignored if the 'what' argument is present, and recently vim has started throwing and error if they are both present and the list is not empty. Fixes mhinz#231
1 parent dde6a66 commit e9004ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/grepper.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,9 +984,9 @@ function! s:finish_up(flags)
984984
\ ? cmdline
985985
\ : {'title': cmdline, 'context': {'query': @/}}
986986
if qf
987-
call setqflist(list, a:flags.append ? 'a' : 'r', attrs)
987+
call setqflist([], a:flags.append ? 'a' : 'r', attrs)
988988
else
989-
call setloclist(0, list, a:flags.append ? 'a' : 'r', attrs)
989+
call setloclist(0, [], a:flags.append ? 'a' : 'r', attrs)
990990
endif
991991
catch /E118/
992992
endtry

0 commit comments

Comments
 (0)