From: Felipe Contreras Date: Sat, 2 Nov 2013 13:55:53 +0000 (+1800) Subject: [PATCH 20/21] vim: check compose is done on delete X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=073078b0302659d52801f922ca95a1911d5bd15f;p=notmuch-archives.git [PATCH 20/21] vim: check compose is done on delete --- diff --git a/e6/44236471e6ce533f9f108a074974bd90858032 b/e6/44236471e6ce533f9f108a074974bd90858032 new file mode 100644 index 000000000..7b531046f --- /dev/null +++ b/e6/44236471e6ce533f9f108a074974bd90858032 @@ -0,0 +1,103 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id BE377431FD0 + for ; Sat, 2 Nov 2013 07:04:22 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id HyBFQkIhB9bf for ; + Sat, 2 Nov 2013 07:04:18 -0700 (PDT) +Received: from mail-ob0-f175.google.com (mail-ob0-f175.google.com + [209.85.214.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id CF4FF429E37 + for ; Sat, 2 Nov 2013 07:03:26 -0700 (PDT) +Received: by mail-ob0-f175.google.com with SMTP id wm4so5575023obc.20 + for ; Sat, 02 Nov 2013 07:03:26 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=hfrliAQJRvT4gMQX8cUffF9yJOuhSYapF4I7Y4QvZLI=; + b=KWQEKu/oG3nwPsWHLXrXELTkXkbsc2e0DFAp96LQSNe42ZC6QATknTtcD5iunPP+JY + tGIIxKTObZcqRMyUuEHyeLoR1oBQr/XllAP1ylOlg9fMAISlaZgN/K06UATeoJStd2/i + omvZepVAOr7Qfn89u5dWt8j39DkxwPip+rlPuWlg6xT9zej0R2v0+KJpwf4GohRAcJHf + bl8WpLB2wA0aFiJNrQH2kzRJO47ypbzBQITbmdl0ZjEF+Sps7EPyDTDegD8Fp9KvLT1B + 3VA9iIcGKk8XbB7OemlzNM57SxbBoGWlzZdzigynC1Pp6iafW9uV89FzWa2Nv6Lccodk + na8Q== +X-Received: by 10.182.104.130 with SMTP id ge2mr6465043obb.6.1383401006412; + Sat, 02 Nov 2013 07:03:26 -0700 (PDT) +Received: from localhost (187-162-140-241.static.axtel.net. [187.162.140.241]) + by mx.google.com with ESMTPSA id + xr8sm11584147obc.12.2013.11.02.07.03.24 for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 02 Nov 2013 07:03:25 -0700 (PDT) +From: Felipe Contreras +To: notmuch@notmuchmail.org +Subject: [PATCH 20/21] vim: check compose is done on delete +Date: Sat, 2 Nov 2013 07:55:53 -0600 +Message-Id: <1383400554-1832-21-git-send-email-felipe.contreras@gmail.com> +X-Mailer: git-send-email 1.8.4.2+fc1 +In-Reply-To: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> +References: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 02 Nov 2013 14:04:23 -0000 + +Not on unload, which happens when we switch buffers. + +Signed-off-by: Felipe Contreras +--- + vim/notmuch.vim | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/vim/notmuch.vim b/vim/notmuch.vim +index 9109470..d7b310c 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 call s:compose_unload() ++ autocmd BufDelete 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 call s:compose_unload() ++ autocmd BufDelete call s:on_compose_delete() + startinsert! + endfunction + +-- +1.8.4.2+fc1 +