vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 2d5f440acdaa5bf2d49c1bf8f9ce6fac49cdadc8 parent a4bfd8f4af932f07fb932f49b5f388ff331dad66 Author: Marc André Tanner <mat@brain-dump.org> Date: Thu, 19 Jan 2017 10:27:06 +0100 sam: use 'm to reference mark m The manual was already mentioning that. Fix #468 Diffstat:
| M | sam.c | | | 6 | +++--- |
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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);