Not on unload, which happens when we switch buffers.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
ruby $curbuf.init(VIM::evaluate('a:type'))
endfunction
-function! s:compose_unload()
+function! s:on_compose_delete()
if b:compose_done
return
endif
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
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