mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-11 13:10:32 +00:00
Plain = _ and ^ default to being relative to cur instead of message 1
This commit is contained in:
parent
8c90754e17
commit
bb773cb7be
5
seq.c
5
seq.c
@ -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++;
|
||||||
|
Loading…
Reference in New Issue
Block a user