just in case...defense coding.

This commit is contained in:
Bailey Ling 2013-09-05 17:17:04 +00:00
parent fc6cf26ac6
commit e1be8ff22f
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ function! s:get_buffer_list()
endfor
" TODO: temporary fix; force the active buffer to be first when there are many buffers open
if len(buffers) > s:buf_max
if len(buffers) > s:buf_max && index(buffers, cur) > -1
while buffers[0] != cur
let first = remove(buffers, 0)
call add(buffers, first)