vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 7645207d0d2b645e58bd6b5d22a01c3bf650bff5 parent ad7cfc7455a631d35a0dd8ac41551633ee4103cf Author: Marc André Tanner <mat@brain-dump.org> Date: Sun, 17 Apr 2016 22:10:34 +0200 vis: indicate primary cursor by using a different color instead of blinking Blinking caused more problems (#251, #202) than it solved. Blank cells were especially problematic. Diffstat:
| M | lexers/themes/dark-16.lua | | | 2 | +- |
| M | lexers/themes/solarized.lua | | | 2 | +- |
| M | ui-curses.c | | | 5 | +---- |
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/lexers/themes/dark-16.lua b/lexers/themes/dark-16.lua @@ -25,7 +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_PRIMARY = lexers.STYLE_CURSOR..',fore:yellow' lexers.STYLE_CURSOR_LINE = 'back:white' lexers.STYLE_COLOR_COLUMN = 'back:white' lexers.STYLE_SELECTION = 'back:white' diff --git a/lexers/themes/solarized.lua b/lexers/themes/solarized.lua @@ -52,7 +52,7 @@ lexers.STYLE_IDENTIFIER = fg lexers.STYLE_LINENUMBER = fg lexers.STYLE_CURSOR = 'fore:'..colors.base03..',back:'..colors.base0 -lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',blink' +lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',back:yellow' lexers.STYLE_CURSOR_LINE = 'back:'..colors.base02 lexers.STYLE_COLOR_COLUMN = 'back:'..colors.base02 -- lexers.STYLE_SELECTION = 'back:'..colors.base02 diff --git a/ui-curses.c b/ui-curses.c @@ -709,10 +709,7 @@ static void ui_window_draw(UiWin *w) { prev_style = style; } wattrset(win->win, attr); - if (multiple_cursors && l->cells[x].cursor_primary && l->cells[x].data[0] == ' ') - waddstr(win->win, "█"); - else - waddstr(win->win, l->cells[x].data); + waddstr(win->win, l->cells[x].data); } /* try to fixup display issues, in theory we should always output a full line */ int x, y;