mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-02-25 02:57:22 +08:00
[Tags] Interrupt handling
This commit is contained in:
@@ -627,19 +627,24 @@ 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')
|
||||||
let [magic, &magic, wrapscan, &wrapscan] = [&magic, 0, &wrapscan, 1]
|
try
|
||||||
for line in a:lines[1:]
|
let [magic, &magic, wrapscan, &wrapscan] = [&magic, 0, &wrapscan, 1]
|
||||||
try
|
for line in a:lines[1:]
|
||||||
let parts = split(line, '\t\zs')
|
try
|
||||||
let excmd = matchstr(join(parts[2:], ''), '^.*\ze;"\t')
|
let parts = split(line, '\t\zs')
|
||||||
call s:open(cmd, parts[1][:-2])
|
let excmd = matchstr(join(parts[2:], ''), '^.*\ze;"\t')
|
||||||
execute excmd
|
call s:open(cmd, parts[1][:-2])
|
||||||
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
execute excmd
|
||||||
catch
|
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
||||||
call s:warn(v:exception)
|
catch /^Vim:Interrupt$/
|
||||||
endtry
|
break
|
||||||
endfor
|
catch
|
||||||
let [&magic, &wrapscan] = [magic, wrapscan]
|
call s:warn(v:exception)
|
||||||
|
endtry
|
||||||
|
endfor
|
||||||
|
finally
|
||||||
|
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