[PATCH] Save and restore point explicitly in `notmuch-wash-toggle-invisible-action'.

Carl Worth cworth at cworth.org
Tue May 24 16:20:34 PDT 2011


On Tue, 24 May 2011 18:43:41 -0400, Austin Clements <amdragon at mit.edu> wrote:
> Saving point this way is a bit dangerous, though.  For example, if
> you're near the end of the buffer and shorten the label, attempting to
> restore the point could result in an error (or, a more benign example:
> the cursor could wind up outside the label so pressing RET repeatedly
> won't toggle it).
> 
> Unfortunately, I don't know of a clean solution to this, but I think I
> would rather the cursor move, but stay within the label (probably
> moving to the beginning), than have problems like the above.

Here's my fix. Let me know what you think.

-Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Carefully-preverse-point-when-changing-button-text-i.patch
Type: text/x-diff
Size: 1707 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110524/7a1c98d7/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110524/7a1c98d7/attachment.pgp>


More information about the notmuch mailing list