diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-11-02 04:38:33 -0600 |
---|---|---|
committer | Felipe Contreras <felipe.contreras@gmail.com> | 2013-11-20 07:23:30 -0600 |
commit | 062a73b9312a4df84f61d1c998b365ceed92313b (patch) | |
tree | 205744bedcccb000b2fcfc851eb5dcef24907dac /vim | |
parent | 2c3623703f4bd1dbe1d5ca47c4bf55e208db12b2 (diff) |
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>
Diffstat (limited to 'vim')
-rw-r--r-- | vim/notmuch.vim | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/vim/notmuch.vim b/vim/notmuch.vim index fc9eaa24..9109470a 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -65,7 +65,6 @@ function! s:new_file_buffer(type, fname) execute printf('set filetype=notmuch-%s', a:type) execute printf('set syntax=notmuch-%s', a:type) ruby $curbuf.init(VIM::evaluate('a:type')) - ruby $buf_queue.push($curbuf.number) endfunction function! s:compose_unload() @@ -268,13 +267,8 @@ endfunction function! s:kill_this_buffer() ruby << EOF - if $buf_queue.size > 1 - $curbuf.close - VIM::command("bdelete!") - $buf_queue.pop - b = $buf_queue.last - VIM::command("buffer #{b}") if b - end + $curbuf.close + VIM::command("bdelete!") EOF endfunction @@ -293,7 +287,6 @@ function! s:new_buffer(type) execute printf('set filetype=notmuch-%s', a:type) execute printf('set syntax=notmuch-%s', a:type) ruby $curbuf.init(VIM::evaluate('a:type')) - ruby $buf_queue.push($curbuf.number) endfunction function! s:set_menu_buffer() @@ -471,7 +464,6 @@ ruby << EOF $db_name = nil $email = $email_name = $email_address = nil $searches = [] - $buf_queue = [] $threads = [] $messages = [] $config = {} |