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

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

Date: Tue, 24 May 2011 16:20:34 -0700

To: Austin Clements, Dmitry Kurochkin

Cc: notmuch@notmuchmail.org

From: Carl Worth


On Tue, 24 May 2011 18:43:41 -0400, Austin Clements <amdragon@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

part-001.sig (application/pgp-signature)

Thread: