From caf7754b2636eabdf1bc11d30daccc5de66951ef Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 25 Mar 2021 01:15:29 +0900 Subject: [PATCH] [Buffers] Increase tabstop according to the string length of bufno e.g. vim {1..1000} +'silent 1bd' Fix #1237 --- autoload/fzf/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 73fb242..9e14f85 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -730,7 +730,7 @@ function! fzf#vim#buffers(...) \ [a:1, a:000[1:]] : ['', a:000] let sorted = fzf#vim#_buflisted_sorted() let header_lines = '--header-lines=' . (bufnr('') == get(sorted, 0, 0) ? 1 : 0) - let tabstop = len(sorted) >= 1000 ? 9 : 8 + let tabstop = len(max(sorted)) >= 4 ? 9 : 8 return s:fzf('buffers', { \ 'source': map(sorted, 'fzf#vim#_format_buffer(v:val)'), \ 'sink*': s:function('s:bufopen'),