Skip to content

Commit

Permalink
Neovim: use {title} from set{qf,loc}list()
Browse files Browse the repository at this point in the history
Set the quickfix title permanently.

Closes #40.
Closes #44.
  • Loading branch information
blueyed authored and mhinz committed Jun 17, 2016
1 parent 3981358 commit 9d1f935
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion autoload/grepper.vim
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,17 @@ endfunction
" s:finish_up() {{{1
function! s:finish_up(flags) abort
let qf = a:flags.quickfix
let size = len(qf ? getqflist() : getloclist(0))
let qlist = getqflist()
let llist = getloclist(0)
let size = len(qf ? qlist : llist)

if has('nvim')
if qf
call setqflist(qlist, 'r', s:cmdline)
else
call setloclist(0, llist, 'r', s:cmdline)
endif
endif

if size == 0
execute (qf ? 'cclose' : 'lclose')
Expand Down

0 comments on commit 9d1f935

Please sign in to comment.