From dd8b8b31ccd53991f263a78d1903d1c295546db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 19 Jan 2017 10:27:06 +0100 Subject: sam: use 'm to reference mark m The manual was already mentioning that. Fix #468 --- sam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sam.c') diff --git a/sam.c b/sam.c index c7a9c48..a150064 100644 --- a/sam.c +++ b/sam.c @@ -53,7 +53,7 @@ struct Change { }; struct Address { - char type; /* # (char) l (line) g (goto line) / ? . $ + - , ; % */ + char type; /* # (char) l (line) g (goto line) / ? . $ + - , ; % ' */ Regex *regex; /* NULL denotes default for x, y, X, and Y commands */ size_t number; /* line or character number */ Address *left; /* left hand side of a compound address , ; */ @@ -668,7 +668,7 @@ static Address *address_parse_simple(Vis *vis, const char **s, enum SamError *er addr.type = 'l'; addr.number = parse_number(s); break; - case '`': + case '\'': (*s)++; if ((addr.number = vis_mark_from(vis, **s)) == VIS_MARK_INVALID) { *err = SAM_ERR_MARK; @@ -979,7 +979,7 @@ static Filerange address_evaluate(Address *addr, File *file, Filerange *range, i case 'g': ret = address_line_evaluate(addr, file, range, sign); break; - case '`': + case '\'': { size_t pos = text_mark_get(file->text, file->marks[addr->number]); ret = text_range_new(pos, pos); -- cgit v1.2.3