1 Return-Path: <dme@dme.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B05C84196F0
\r
6 for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 07:53:51 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 7RfcfU0-SFOW for <notmuch@notmuchmail.org>;
\r
16 Mon, 26 Apr 2010 07:53:50 -0700 (PDT)
\r
17 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 8A2CB431FC1
\r
20 for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 07:53:50 -0700 (PDT)
\r
21 Received: by fxm1 with SMTP id 1so201677fxm.26
\r
22 for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 07:53:49 -0700 (PDT)
\r
23 Received: by 10.86.126.33 with SMTP id y33mr7634650fgc.51.1272293625013;
\r
24 Mon, 26 Apr 2010 07:53:45 -0700 (PDT)
\r
25 Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com
\r
27 by mx.google.com with ESMTPS id 2sm323158faf.15.2010.04.26.07.53.43
\r
28 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
29 Mon, 26 Apr 2010 07:53:43 -0700 (PDT)
\r
30 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
31 id 9771859413B; Mon, 26 Apr 2010 15:53:53 +0100 (BST)
\r
33 To: notmuch@notmuchmail.org
\r
34 Subject: [PATCH] emacs: Fix `notmuch-show-rewind' in the presence of invisible
\r
36 Date: Mon, 26 Apr 2010 15:53:52 +0100
\r
37 Message-Id: <1272293632-15715-1-git-send-email-dme@dme.org>
\r
38 X-Mailer: git-send-email 1.7.0
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Mon, 26 Apr 2010 14:53:51 -0000
\r
53 From: David Edmondson <dme@dme.org>
\r
55 When determining whether or not to re-align the head of the current
\r
56 message with the top of the window, use `count-screen-lines' rather
\r
57 than `count-lines' to allow for invisible text in the preceding
\r
58 message. When comparing that number of lines against
\r
59 `next-screen-context-lines', realign if the number of lines of the
\r
60 previous message visible is 'smaller than or equal to' rather than
\r
61 just 'smaller than' to improve usability.
\r
63 emacs/notmuch-show.el | 4 ++--
\r
64 1 files changed, 2 insertions(+), 2 deletions(-)
\r
66 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
67 index f5de8ae..eb5335f 100644
\r
68 --- a/emacs/notmuch-show.el
\r
69 +++ b/emacs/notmuch-show.el
\r
70 @@ -833,8 +833,8 @@ any effects from previous calls to
\r
71 ;; If a small number of lines from the previous message are
\r
72 ;; visible, realign so that the top of the current message is at
\r
73 ;; the top of the screen.
\r
74 - (if (< (count-lines (window-start) (notmuch-show-message-top))
\r
75 - next-screen-context-lines)
\r
76 + (if (<= (count-screen-lines (window-start) start-of-message)
\r
77 + next-screen-context-lines)
\r
79 (goto-char (notmuch-show-message-top))
\r
80 (notmuch-show-message-adjust)))
\r