-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Catch E118 for set{qf,loc}list for old versions
References #44.
- Loading branch information
Showing
1 changed file
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -437,20 +437,23 @@ function! s:restore_mapping(mapping) | |
endfunction | ||
|
||
" s:finish_up() {{{1 | ||
function! s:finish_up(flags) abort | ||
function! s:finish_up(flags) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mhinz
Author
Owner
|
||
let qf = a:flags.quickfix | ||
let qlist = getqflist() | ||
let llist = getloclist(0) | ||
let size = len(qf ? qlist : llist) | ||
|
||
call s:restore_errorformat() | ||
|
||
let title = has('nvim') ? s:cmdline : {'title': s:cmdline} | ||
if qf | ||
call setqflist(qlist, 'r', title) | ||
else | ||
call setloclist(0, llist, 'r', title) | ||
endif | ||
try | ||
let title = has('nvim') ? s:cmdline : {'title': s:cmdline} | ||
if qf | ||
call setqflist(qlist, 'r', title) | ||
else | ||
call setloclist(0, llist, 'r', title) | ||
endif | ||
catch /E118/ | ||
endtry | ||
|
||
if size == 0 | ||
execute (qf ? 'cclose' : 'lclose') | ||
|
Removed on purpose?