diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-11-02 04:40:01 -0600 |
---|---|---|
committer | Felipe Contreras <felipe.contreras@gmail.com> | 2013-11-20 07:23:30 -0600 |
commit | 3d15ed9290013e31a743c20139da16c8ccaa2bb7 (patch) | |
tree | 413086ecbd13394875613d1ccaf0800dd5d86f81 | |
parent | 062a73b9312a4df84f61d1c998b365ceed92313b (diff) |
vim: check compose is done on delete
Not on unload, which happens when we switch buffers.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
-rw-r--r-- | vim/notmuch.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vim/notmuch.vim b/vim/notmuch.vim index 9109470a..d7b310c8 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -67,7 +67,7 @@ function! s:new_file_buffer(type, fname) ruby $curbuf.init(VIM::evaluate('a:type')) endfunction -function! s:compose_unload() +function! s:on_compose_delete() if b:compose_done return endif @@ -126,7 +126,7 @@ function! s:show_reply() ruby open_reply get_message.mail let b:compose_done = 0 call s:set_map(g:notmuch_compose_maps) - autocmd BufUnload <buffer> call s:compose_unload() + autocmd BufDelete <buffer> call s:on_compose_delete() startinsert! endfunction @@ -134,7 +134,7 @@ function! s:compose() ruby open_compose let b:compose_done = 0 call s:set_map(g:notmuch_compose_maps) - autocmd BufUnload <buffer> call s:compose_unload() + autocmd BufDelete <buffer> call s:on_compose_delete() startinsert! endfunction |