Plain = _ and ^ default to being relative to cur instead of message 1

This commit is contained in:
Oliver Kiddle 2017-07-01 12:46:45 +02:00
parent 8c90754e17
commit bb773cb7be

5
seq.c
View File

@ -337,7 +337,8 @@ parse_parent(char *map, long *starto, long *stopo)
static int static int
parse_range(char *map, char *a, long *start, long *stop, long cur, long lines) 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 != '^') { while (*a && *a != ':' && *a != '=' && *a != '_' && *a != '^') {
char *b = parse_relnum(a, cur, lines, start); 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; return 0;
a = b; a = b;
} }
if (*start == 0)
*start = strchr("=^_", *a) ? cur : 1;
while (*a == '^') { while (*a == '^') {
a++; a++;