From e5ee84281b5dc984be1857e6bdb72b3895c6e3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 11 Mar 2016 10:06:24 +0100 Subject: ui: also blink primary cursor if it is on a blank cell --- lexers/themes/dark-16.lua | 1 + ui-curses.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lexers/themes/dark-16.lua b/lexers/themes/dark-16.lua index 77673dc..50c603d 100644 --- 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 index 44dd18e..3d45b62 100644 --- 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; -- cgit v1.2.3