vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit d6e0dd4f71374f16c3edac30a778b2ded3b14db0 parent cee169f618cec471aa6c202a85049e6fe6ada071 Author: Marc André Tanner <mat@brain-dump.org> Date: Mon, 27 Oct 2014 12:28:16 +0100 Also join lines if cursor is on newline (after text) Diffstat:
| M | vis.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vis.c b/vis.c @@ -650,7 +650,7 @@ static void op_join(OperatorContext *c) { prev_pos = pos; size_t end = text_line_start(txt, pos); pos = text_char_next(txt, text_line_finish(txt, text_line_prev(txt, end))); - if (pos > c->range.start && end > pos) { + if (pos >= c->range.start && end > pos) { text_delete(txt, pos, end - pos); text_insert(txt, pos, " ", 1); } else {