Addendum fix for #136

- Apply --tabstop=1 to line completion
- Fix incorrect --nth

Related: #139, #136
This commit is contained in:
Junegunn Choi
2016-04-29 10:30:48 +09:00
parent 1a379acb0a
commit fcc798e99e
2 changed files with 9 additions and 5 deletions

View File

@@ -141,10 +141,12 @@ endfunction
function! fzf#vim#complete#line(...)
let [display_bufnames, lines] = fzf#vim#_lines(0)
let nth = display_bufnames ? 4 : 3
return fzf#vim#complete(s:extend({
\ 'prefix': '^.*$',
\ 'source': fzf#vim#_lines(0),
\ 'options': '--tiebreak=index --ansi --nth 4..',
\ 'source': lines,
\ 'options': '--tiebreak=index --ansi --nth '.nth.'.. --tabstop=1',
\ 'reducer': s:function('s:reduce_line')}, get(a:000, 0, g:fzf#vim#default_layout)))
endfunction