On Tue, Aug 30, 2016 at 05:00:25PM -0700, [email protected] wrote:
> # HG changeset patch
> # User David Champion <[email protected]>
> # Date 1472600377 25200
> #      Tue Aug 30 16:39:37 2016 -0700
> # Node ID 788059e7b1182f283c6d21139beaf9dd0d587035
> # Parent  d2a36497a89c8af5de751bea6dd1e20932b5604a
> Adds <mark-message> binding to create "hotkeys" for messages.
> 
> <mark-message>foo<enter> will create a new macro "'foo" which will
> return to the current message by searching for that message's
> message id.  The initial character of the macro is defined by
> $mark_macro_prefix, and defaults to "'" for verisimilitude vs. vi.
> 

> diff --git a/curs_main.c b/curs_main.c
> --- a/curs_main.c
> +++ b/curs_main.c
> @@ -2197,6 +2197,32 @@
>       }
>       break;
>  
> +
> +      case OP_MARK_MSG:

Add a CHECK_MSGCOUNT here to avoid a segfault on an empty mailbox.

You probably also want a CHECK_VISIBLE since it doesn't make sense to do
this on a selected but invisible message.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to