mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-07 21:24:40 +08:00
@@ -730,10 +730,11 @@ function! fzf#vim#buffers(...)
|
|||||||
\ [a:1, a:000[1:]] : ['', a:000]
|
\ [a:1, a:000[1:]] : ['', a:000]
|
||||||
let sorted = fzf#vim#_buflisted_sorted()
|
let sorted = fzf#vim#_buflisted_sorted()
|
||||||
let header_lines = '--header-lines=' . (bufnr('') == get(sorted, 0, 0) ? 1 : 0)
|
let header_lines = '--header-lines=' . (bufnr('') == get(sorted, 0, 0) ? 1 : 0)
|
||||||
|
let tabstop = len(sorted) >= 1000 ? 9 : 8
|
||||||
return s:fzf('buffers', {
|
return s:fzf('buffers', {
|
||||||
\ 'source': map(sorted, 'fzf#vim#_format_buffer(v:val)'),
|
\ 'source': map(sorted, 'fzf#vim#_format_buffer(v:val)'),
|
||||||
\ 'sink*': s:function('s:bufopen'),
|
\ 'sink*': s:function('s:bufopen'),
|
||||||
\ 'options': ['+m', '-x', '--tiebreak=index', header_lines, '--ansi', '-d', '\t', '--with-nth', '3..', '-n', '2,1..2', '--prompt', 'Buf> ', '--query', query, '--preview-window', '+{2}-/2']
|
\ 'options': ['+m', '-x', '--tiebreak=index', header_lines, '--ansi', '-d', '\t', '--with-nth', '3..', '-n', '2,1..2', '--prompt', 'Buf> ', '--query', query, '--preview-window', '+{2}-/2', '--tabstop', tabstop]
|
||||||
\}, args)
|
\}, args)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user