vis

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

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

commit d21cfbfc5198479aef2e09656716718a1fa2b280
parent e18612bb86a092d785e661f885065942441435d6
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue, 28 Jul 2015 13:17:15 +0200

ui: try to fixup unicode display issues

The handling of combining characters needs to be reviewed there are
still strange things going on. This only covers up some of the artifacts.

Diffstat:
Mui-curses.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/ui-curses.c b/ui-curses.c @@ -369,6 +369,13 @@ static void ui_window_draw_text(UiWin *w, const Line *line) { wattrset(win->win, attr); waddstr(win->win, l->cells[x].data); } + /* try to fixup display issues, in theory we should always output a full line */ + int x, y; + getyx(win->win, y, x); + (void)y; + wattrset(win->win, A_NORMAL); + for (; 0 < x && x < width; x++) + waddstr(win->win, " "); } wclrtobot(win->win);