mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-02-22 01:28:37 +08:00
Merge pull request #140 from blueyed/vim-tags-handle-nowrapscan
[vim] handle 'nowrapscan' option in s:tags_sink
This commit is contained in:
@@ -604,7 +604,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')
|
||||||
let [magic, &magic] = [&magic, 0]
|
let [magic, &magic, wrapscan, &wrapscan] = [&magic, 0, &wrapscan, 1]
|
||||||
for line in a:lines[1:]
|
for line in a:lines[1:]
|
||||||
let parts = split(line, '\t\zs')
|
let parts = split(line, '\t\zs')
|
||||||
let excmd = matchstr(join(parts[2:], ''), '^.*\ze;"\t')
|
let excmd = matchstr(join(parts[2:], ''), '^.*\ze;"\t')
|
||||||
@@ -612,7 +612,7 @@ function! s:tags_sink(lines)
|
|||||||
execute excmd
|
execute excmd
|
||||||
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
||||||
endfor
|
endfor
|
||||||
let &magic = magic
|
let [&magic, &wrapscan] = [magic, wrapscan]
|
||||||
if len(qfl) > 1
|
if len(qfl) > 1
|
||||||
call setqflist(qfl)
|
call setqflist(qfl)
|
||||||
copen
|
copen
|
||||||
|
|||||||
Reference in New Issue
Block a user