mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
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>
This commit is contained in:
parent
062a73b931
commit
3d15ed9290
1 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ function! s:new_file_buffer(type, fname)
|
||||||
ruby $curbuf.init(VIM::evaluate('a:type'))
|
ruby $curbuf.init(VIM::evaluate('a:type'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:compose_unload()
|
function! s:on_compose_delete()
|
||||||
if b:compose_done
|
if b:compose_done
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
@ -126,7 +126,7 @@ function! s:show_reply()
|
||||||
ruby open_reply get_message.mail
|
ruby open_reply get_message.mail
|
||||||
let b:compose_done = 0
|
let b:compose_done = 0
|
||||||
call s:set_map(g:notmuch_compose_maps)
|
call s:set_map(g:notmuch_compose_maps)
|
||||||
autocmd BufUnload <buffer> call s:compose_unload()
|
autocmd BufDelete <buffer> call s:on_compose_delete()
|
||||||
startinsert!
|
startinsert!
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ function! s:compose()
|
||||||
ruby open_compose
|
ruby open_compose
|
||||||
let b:compose_done = 0
|
let b:compose_done = 0
|
||||||
call s:set_map(g:notmuch_compose_maps)
|
call s:set_map(g:notmuch_compose_maps)
|
||||||
autocmd BufUnload <buffer> call s:compose_unload()
|
autocmd BufDelete <buffer> call s:on_compose_delete()
|
||||||
startinsert!
|
startinsert!
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue