vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit c4f23a0b99367e65df79346363104670520605ef parent 03f2fa8855466f178a356feb46a322afd5098303 Author: Marc André Tanner <mat@brain-dump.org> Date: Fri, 24 Feb 2017 09:47:12 +0100 vis: fix ^ motion for blank lines terminated by \r\n Diffstat:
| M | text-motions.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/text-motions.c b/text-motions.c @@ -137,7 +137,7 @@ size_t text_line_begin(Text *txt, size_t pos) { size_t text_line_start(Text *txt, size_t pos) { char c; Iterator it = text_iterator_get(txt, text_line_begin(txt, pos)); - while (text_iterator_byte_get(&it, &c) && c != '\n' && space(c)) + while (text_iterator_byte_get(&it, &c) && c != '\r' && c != '\n' && space(c)) text_iterator_byte_next(&it, NULL); return it.pos; }