mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-09 21:12:32 +08:00
Addendum fix for #136
- Apply --tabstop=1 to line completion - Fix incorrect --nth Related: #139, #136
This commit is contained in:
@@ -253,14 +253,16 @@ function! fzf#vim#_lines(all)
|
||||
\ '(!a:all && empty(v:val)) ? "" : printf(s:blue("%2d\t", "TabLine")."%s".s:yellow("\t%4d ", "LineNr")."\t%s", b, bufname, v:key + 1, v:val)'),
|
||||
\ 'a:all || !empty(v:val)'))
|
||||
endfor
|
||||
return extend(cur, rest)
|
||||
return [display_bufnames, extend(cur, rest)]
|
||||
endfunction
|
||||
|
||||
function! fzf#vim#lines(...)
|
||||
let [display_bufnames, lines] = fzf#vim#_lines(1)
|
||||
let nth = display_bufnames ? 3 : 2
|
||||
return s:fzf(fzf#vim#wrap({
|
||||
\ 'source': fzf#vim#_lines(1),
|
||||
\ 'source': lines,
|
||||
\ 'sink*': s:function('s:line_handler'),
|
||||
\ 'options': '+m --tiebreak=index --prompt "Lines> " --ansi --extended --nth=3.. --reverse --tabstop=1'
|
||||
\ 'options': '+m --tiebreak=index --prompt "Lines> " --ansi --extended --nth='.nth.'.. --reverse --tabstop=1'
|
||||
\}), a:000)
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user