[Lines][BLines][Tags] use list form for options

This commit is contained in:
Jan Edmund Lazo 2018-04-09 00:41:55 -04:00 committed by Junegunn Choi
parent a362bc58f1
commit 9f0bae1248

View file

@ -365,7 +365,7 @@ function! fzf#vim#lines(...)
return s:fzf('lines', {
\ 'source': lines,
\ 'sink*': s:function('s:line_handler'),
\ 'options': '+m --tiebreak=index --prompt "Lines> " --ansi --extended --nth='.nth.'.. --reverse --tabstop=1'.s:q(query)
\ 'options': ['+m', '--tiebreak=index', '--prompt', 'Lines> ', '--ansi', '--extended', '--nth='.nth.'..', '--reverse', '--tabstop=1', '--query', query]
\}, args)
endfunction
@ -397,7 +397,7 @@ function! fzf#vim#buffer_lines(...)
return s:fzf('blines', {
\ 'source': s:buffer_lines(),
\ 'sink*': s:function('s:buffer_line_handler'),
\ 'options': '+m --tiebreak=index --prompt "BLines> " --ansi --extended --nth=2.. --reverse --tabstop=1'.s:q(query)
\ 'options': ['+m', '--tiebreak=index', '--prompt', 'BLines> ', '--ansi', '--extended', '--nth=2..', '--reverse', '--tabstop=1', '--query', query]
\}, args)
endfunction
@ -834,12 +834,12 @@ function! fzf#vim#tags(query, ...)
break
endif
endfor
let opts = v2_limit < 0 ? '--algo=v1 ' : ''
let opts = v2_limit < 0 ? ['--algo=v1'] : []
return s:fzf('tags', {
\ 'source': 'perl '.fzf#shellescape(s:bin.tags).' '.join(map(tagfiles, 'fzf#shellescape(fnamemodify(v:val, ":p"))')),
\ 'sink*': s:function('s:tags_sink'),
\ 'options': opts.'--nth 1..2 -m --tiebreak=begin --prompt "Tags> "'.s:q(a:query)}, a:000)
\ 'options': extend(opts, ['--nth', '1..2', '-m', '--tiebreak=begin', '--prompt', 'Tags> ', '--query', a:query])}, a:000)
endfunction
" ------------------------------------------------------------------