mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-08-13 03:11:02 +08:00
[Tags] Interrupt handling
This commit is contained in:
@@ -627,6 +627,7 @@ function! s:tags_sink(lines)
|
|||||||
normal! m'
|
normal! m'
|
||||||
let qfl = []
|
let qfl = []
|
||||||
let cmd = get(get(g:, 'fzf_action', s:default_action), a:lines[0], 'e')
|
let cmd = get(get(g:, 'fzf_action', s:default_action), a:lines[0], 'e')
|
||||||
|
try
|
||||||
let [magic, &magic, wrapscan, &wrapscan] = [&magic, 0, &wrapscan, 1]
|
let [magic, &magic, wrapscan, &wrapscan] = [&magic, 0, &wrapscan, 1]
|
||||||
for line in a:lines[1:]
|
for line in a:lines[1:]
|
||||||
try
|
try
|
||||||
@@ -635,11 +636,15 @@ function! s:tags_sink(lines)
|
|||||||
call s:open(cmd, parts[1][:-2])
|
call s:open(cmd, parts[1][:-2])
|
||||||
execute excmd
|
execute excmd
|
||||||
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
||||||
|
catch /^Vim:Interrupt$/
|
||||||
|
break
|
||||||
catch
|
catch
|
||||||
call s:warn(v:exception)
|
call s:warn(v:exception)
|
||||||
endtry
|
endtry
|
||||||
endfor
|
endfor
|
||||||
|
finally
|
||||||
let [&magic, &wrapscan] = [magic, wrapscan]
|
let [&magic, &wrapscan] = [magic, wrapscan]
|
||||||
|
endtry
|
||||||
if len(qfl) > 1
|
if len(qfl) > 1
|
||||||
call setqflist(qfl)
|
call setqflist(qfl)
|
||||||
copen
|
copen
|
||||||
|
|||||||
Reference in New Issue
Block a user