From e01b2a99c02dffe0fe7b23e7d8a7872df97eddf2 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sun, 22 Sep 2013 11:01:12 -0400 Subject: [PATCH] remove comment about file length, as it is already proper. --- autoload/airline/extensions/tabline.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 23f1548d..c6623ab4 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -112,16 +112,15 @@ function! s:get_visible_buffers() let max_width = 0 for nr in buffers - " TODO: get this information from the builder? let width = len(airline#extensions#tabline#get_buffer_name(nr)) + 4 let total_width += width let max_width = max([max_width, width]) endfor " only show current and surrounding buffers if there are too many buffers - if total_width > winwidth(0) && index(buffers, cur) > -1 + let position = index(buffers, cur) + if total_width > winwidth(0) && position > -1 let buf_count = len(buffers) - let position = index(buffers, cur) " determine how many buffers to show based on the longest buffer width, " use one on the right side and put the rest on the left