vim: remove unnecessary buffer queue

Vim handles the buffers just fine: when one is deleted, we go to the
previous one.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras 2013-11-02 04:38:33 -06:00
parent 2c3623703f
commit 062a73b931

View file

@ -65,7 +65,6 @@ function! s:new_file_buffer(type, fname)
execute printf('set filetype=notmuch-%s', a:type) execute printf('set filetype=notmuch-%s', a:type)
execute printf('set syntax=notmuch-%s', a:type) execute printf('set syntax=notmuch-%s', a:type)
ruby $curbuf.init(VIM::evaluate('a:type')) ruby $curbuf.init(VIM::evaluate('a:type'))
ruby $buf_queue.push($curbuf.number)
endfunction endfunction
function! s:compose_unload() function! s:compose_unload()
@ -268,13 +267,8 @@ endfunction
function! s:kill_this_buffer() function! s:kill_this_buffer()
ruby << EOF ruby << EOF
if $buf_queue.size > 1
$curbuf.close $curbuf.close
VIM::command("bdelete!") VIM::command("bdelete!")
$buf_queue.pop
b = $buf_queue.last
VIM::command("buffer #{b}") if b
end
EOF EOF
endfunction endfunction
@ -293,7 +287,6 @@ function! s:new_buffer(type)
execute printf('set filetype=notmuch-%s', a:type) execute printf('set filetype=notmuch-%s', a:type)
execute printf('set syntax=notmuch-%s', a:type) execute printf('set syntax=notmuch-%s', a:type)
ruby $curbuf.init(VIM::evaluate('a:type')) ruby $curbuf.init(VIM::evaluate('a:type'))
ruby $buf_queue.push($curbuf.number)
endfunction endfunction
function! s:set_menu_buffer() function! s:set_menu_buffer()
@ -471,7 +464,6 @@ ruby << EOF
$db_name = nil $db_name = nil
$email = $email_name = $email_address = nil $email = $email_name = $email_address = nil
$searches = [] $searches = []
$buf_queue = []
$threads = [] $threads = []
$messages = [] $messages = []
$config = {} $config = {}