mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 7d66bb8db70d6e3f5009bde30795477bd5d46372
parent ef65274d43e7ab1d8a7f4fce353bb6a173bda987
Author: Oliver Kiddle <okiddle@yahoo.co.uk>
Date:   Sat,  1 Jul 2017 12:46:45 +0200

seq: parse_range: = _ and ^ default to being relative to cur instead of message 1

Diffstat:
seq.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/seq.c b/seq.c @@ -337,7 +337,8 @@ parse_parent(char *map, long *starto, long *stopo) static int parse_range(char *map, char *a, long *start, long *stop, long cur, long lines) { - *start = *stop = 1; + *start = 0; + *stop = 1; while (*a && *a != ':' && *a != '=' && *a != '_' && *a != '^') { char *b = parse_relnum(a, cur, lines, start); @@ -345,6 +346,8 @@ parse_range(char *map, char *a, long *start, long *stop, long cur, long lines) return 0; a = b; } + if (*start == 0) + *start = strchr("=^_", *a) ? cur : 1; while (*a == '^') { a++;