From ea23c84f6a04898ccd835459538911dea1a736f6 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 4 Oct 2016 23:10:35 +0200 Subject: [PATCH] Vim: set title when using set{qf,loc}list() References #44. --- autoload/grepper.vim | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/autoload/grepper.vim b/autoload/grepper.vim index d62d730..f4ef8d2 100644 --- a/autoload/grepper.vim +++ b/autoload/grepper.vim @@ -445,12 +445,11 @@ function! s:finish_up(flags) abort call s:restore_errorformat() - if has('nvim') - if qf - call setqflist(qlist, 'r', s:cmdline) - else - call setloclist(0, llist, 'r', s:cmdline) - endif + let title = has('nvim') ? s:cmdline : {'title': s:cmdline} + if qf + call setqflist(qlist, 'r', title) + else + call setloclist(0, llist, 'r', title) endif if size == 0