vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 8514310fd7cd6a7c6043323f4cb0931fcf8fa208
parent c932a258e7d95a9a3c6d8b42907d2466533de1e7
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue, 29 Dec 2015 08:55:51 +0100

view: fix new line handling at the end of visible area

The last new line is added to the cell matrix but failure
is reported to indicate that there is no space left for
further characters.

Diffstat:
Mview.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/view.c b/view.c @@ -383,7 +383,7 @@ static bool view_addch(View *view, Cell *cell) { if (view->line) view->line->lineno = lineno + 1; view->col = 0; - return true; + return view->line; default: if ((unsigned char)cell->data[0] < 128 && !isprint((unsigned char)cell->data[0])) { /* non-printable ascii char, represent it as ^(char + 64) */