aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-04-17 22:10:34 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-04-17 22:10:34 +0200
commit016180e28ad42206cb4522891ef440294bd9ebf5 (patch)
tree0ebd449b52c96520fccbb0ca9ec854ca2020534b
parentec4d9a1c3f453d807418d8260fce0cdf465225dc (diff)
downloadvis-016180e28ad42206cb4522891ef440294bd9ebf5.tar.gz
vis-016180e28ad42206cb4522891ef440294bd9ebf5.tar.xz
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.
-rw-r--r--lexers/themes/dark-16.lua2
-rw-r--r--lexers/themes/solarized.lua2
-rw-r--r--ui-curses.c5
3 files changed, 3 insertions, 6 deletions
diff --git a/lexers/themes/dark-16.lua b/lexers/themes/dark-16.lua
index 50c603d..7e38b7b 100644
--- 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
index b7b89a3..fcbd704 100644
--- 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
index f5b1194..d60cd04 100644
--- 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;