vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 761d85fac716eb30ab434ecd5260fd21b5a93aff parent 884ce345ddd148e61277e603239580e3f62cf2ad Author: Marc André Tanner <mat@brain-dump.org> Date: Sun, 11 Mar 2018 23:34:26 +0100 view: properly advance over incomplete unicode sequence When fetching more text we have to skip the bytes processed by the previous cell, otherwise we end up in an infinite loop. Diffstat:
| M | view.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/view.c b/view.c @@ -360,7 +360,7 @@ void view_draw(View *view) { * wide character. advance file position and read * another junk into buffer. */ - rem = text_bytes_get(view->text, pos, size, text); + rem = text_bytes_get(view->text, pos+prev_cell.len, size, text); text[rem] = '\0'; cur = text; continue;