From 1e3165ef5e684c648a323bf082e1892462b354de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 14 May 2015 19:38:52 +0200 Subject: In command mode make the '.' range specifier match the current line --- vis.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 42b224e..7a090ae 100644 --- a/vis.c +++ b/vis.c @@ -1701,6 +1701,7 @@ static Filerange parse_range(char **cmd) { Text *txt = vis->win->file->text; Filerange r = text_range_empty(); Mark *marks = vis->win->file->marks; + char start = **cmd; switch (**cmd) { case '%': r.start = 0; @@ -1714,8 +1715,11 @@ static Filerange parse_range(char **cmd) { break; default: r.start = parse_pos(cmd); - if (**cmd != ',') + if (**cmd != ',') { + if (start == '.') + r.end = text_line_next(txt, r.start); return r; + } (*cmd)++; r.end = parse_pos(cmd); break; -- cgit v1.2.3