diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-05-14 19:38:52 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-05-14 19:38:52 +0200 |
| commit | 1e3165ef5e684c648a323bf082e1892462b354de (patch) | |
| tree | c1ef0c083fe26d254c9de847843d524d4ec121e5 | |
| parent | 55b1175aa7ee4c3f790c23dcca279dc5ed209725 (diff) | |
| download | vis-1e3165ef5e684c648a323bf082e1892462b354de.tar.gz vis-1e3165ef5e684c648a323bf082e1892462b354de.tar.xz | |
In command mode make the '.' range specifier match the current line
| -rw-r--r-- | vis.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |
