vis

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

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

commit 24b3ecc680ef7ede3093d05d2d71e19c6da0eba1
parent 726ff221ef448c3eaa5d6fdf803127e99a2ed631
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 11 Mar 2016 10:06:24 +0100

ui: also blink primary cursor if it is on a blank cell

Diffstat:
Mlexers/themes/dark-16.lua | 1+
Mui-curses.c | 5++++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lexers/themes/dark-16.lua b/lexers/themes/dark-16.lua @@ -25,6 +25,7 @@ lexers.STYLE_IDENTIFIER = 'fore:white' lexers.STYLE_LINENUMBER = 'fore:white' lexers.STYLE_CURSOR = 'reverse' +lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',blink' lexers.STYLE_CURSOR_LINE = 'back:white' lexers.STYLE_COLOR_COLUMN = 'back:white' lexers.STYLE_SELECTION = 'back:white' diff --git a/ui-curses.c b/ui-curses.c @@ -709,7 +709,10 @@ static void ui_window_draw(UiWin *w) { prev_style = style; } wattrset(win->win, attr); - waddstr(win->win, l->cells[x].data); + if (multiple_cursors && l->cells[x].cursor_primary && l->cells[x].data[0] == ' ') + waddstr(win->win, "█"); + else + waddstr(win->win, l->cells[x].data); } /* try to fixup display issues, in theory we should always output a full line */ int x, y;