From 832e62df9255a902dcd883a9b462b165b788438b Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Tue, 12 Jul 2011 01:40:10 +2000 Subject: [PATCH] [PATCH 5/5] vim: fix citation/signature fold lengths --- 5f/72991a383660726b960c3a09a3485ee093485a | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 5f/72991a383660726b960c3a09a3485ee093485a diff --git a/5f/72991a383660726b960c3a09a3485ee093485a b/5f/72991a383660726b960c3a09a3485ee093485a new file mode 100644 index 000000000..fa0ae9b5b --- /dev/null +++ b/5f/72991a383660726b960c3a09a3485ee093485a @@ -0,0 +1,96 @@ +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 8943D431FB6 + for ; Sun, 10 Jul 2011 22:40:43 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-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 N9oUtsqCFQpM for ; + Sun, 10 Jul 2011 22:40:42 -0700 (PDT) +Received: from mail-vw0-f53.google.com (mail-vw0-f53.google.com + [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6EFBE429E29 + for ; Sun, 10 Jul 2011 22:40:39 -0700 (PDT) +Received: by mail-vw0-f53.google.com with SMTP id 13so2781812vws.26 + for ; Sun, 10 Jul 2011 22:40:39 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; + h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to + :references; bh=4ORxUKr95fZhq27SLRENn5ER8jrb8X5Ms/dBRCQHjHM=; + b=Brqe4sC3FWk+wlXwKfQsN4zpX1OXuvolS4Zy6mtlAPcywY8Sx2M0Wso2I1/H4rDxXP + BsaAWkpPxqfpdMfcSt9Hbigc7DW2WKy1SvFdbsBBCwR4M5uHKACzohQHC8iY3VctI5+u + iRK7ySE3g0g/ZU1XW2XsW3iSbEIQiNdB97lXg= +Received: by 10.52.155.173 with SMTP id vx13mr1925829vdb.411.1310362839202; + Sun, 10 Jul 2011 22:40:39 -0700 (PDT) +Received: from localhost.localdomain (c-98-216-100-90.hsd1.ma.comcast.net + [98.216.100.90]) + by mx.google.com with ESMTPS id bl2sm5324172vbb.9.2011.07.10.22.40.38 + (version=SSLv3 cipher=OTHER); Sun, 10 Jul 2011 22:40:38 -0700 (PDT) +Sender: Jason Woofenden +From: Jason Woofenden +To: notmuch@notmuchmail.org +Subject: [PATCH 5/5] vim: fix citation/signature fold lengths +Date: Mon, 11 Jul 2011 01:40:10 -0400 +Message-Id: <1310362810-10926-6-git-send-email-jason@jasonwoof.com> +X-Mailer: git-send-email 1.7.5.4 +In-Reply-To: <1310362810-10926-1-git-send-email-jason@jasonwoof.com> +References: <1310362810-10926-1-git-send-email-jason@jasonwoof.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: Mon, 11 Jul 2011 05:40:43 -0000 + +Before they'd often miss the last line +--- + vim/plugin/notmuch.vim | 11 +++++++---- + 1 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim +index 2095547..12a0f88 100644 +--- a/vim/plugin/notmuch.vim ++++ b/vim/plugin/notmuch.vim +@@ -747,8 +747,11 @@ function! s:NM_cmd_show_parse(inlines) + elseif mode_type == 'cit' + if part_end || match(line, g:notmuch_show_citation_regexp) == -1 + let outlnum = len(info['disp']) +- let foldinfo = [ mode_type, mode_start, outlnum-1, len(info['msgs']), +- \ printf('[ %d-line citation. Press "c" to show. ]', outlnum - mode_start) ] ++ if !part_end ++ let outlnum = outlnum - 1 ++ endif ++ let foldinfo = [ mode_type, mode_start, outlnum, len(info['msgs']), ++ \ printf('[ %d-line citation. Press "c" to show. ]', 1 + outlnum - mode_start) ] + let mode_type = '' + endif + elseif mode_type == 'sig' +@@ -756,8 +759,8 @@ function! s:NM_cmd_show_parse(inlines) + if (outlnum - mode_start) > g:notmuch_show_signature_lines_max + let mode_type = '' + elseif part_end +- let foldinfo = [ mode_type, mode_start, outlnum-1, len(info['msgs']), +- \ printf('[ %d-line signature. Press "i" to show. ]', outlnum - mode_start) ] ++ let foldinfo = [ mode_type, mode_start, outlnum, len(info['msgs']), ++ \ printf('[ %d-line signature. Press "i" to show. ]', 1 + outlnum - mode_start) ] + let mode_type = '' + endif + endif +-- +1.7.5.4 + -- 2.26.2