diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-03-10 21:55:41 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-03-10 22:36:54 +0100 |
| commit | 0e322d577bf834d8f7c9a7d3c53a58f8e7bb93c1 (patch) | |
| tree | eefe6bbc9eb8ce96d71cd8b857cace4caa662507 /ui-curses.c | |
| parent | 650ef03aa0529f7b69e4757697f161258b07ef1d (diff) | |
| download | vis-0e322d577bf834d8f7c9a7d3c53a58f8e7bb93c1.tar.gz vis-0e322d577bf834d8f7c9a7d3c53a58f8e7bb93c1.tar.xz | |
ui: make primary cursor blink
Diffstat (limited to 'ui-curses.c')
| -rw-r--r-- | ui-curses.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui-curses.c b/ui-curses.c index e38eb7b..35d43c8 100644 --- a/ui-curses.c +++ b/ui-curses.c @@ -683,13 +683,17 @@ static void ui_window_draw(UiWin *w) { } short selection_bg = win->styles[UI_STYLE_SELECTION].bg; short cursor_line_bg = win->styles[UI_STYLE_CURSOR_LINE].bg; + bool multiple_cursors = view_cursors_next(view_cursors(win->view)); attr_t attr = A_NORMAL; for (const Line *l = view_lines_get(win->view); l; l = l->next) { bool cursor_line = l->lineno == cursor_lineno; for (int x = 0; x < width; x++) { CellStyle *style = &win->styles[l->cells[x].attr]; if (l->cells[x].cursor && win->ui->selwin == win) { - attr = style_to_attr(&win->styles[UI_STYLE_CURSOR]); + if (multiple_cursors && l->cells[x].cursor_primary) + attr = style_to_attr(&win->styles[UI_STYLE_CURSOR_PRIMARY]); + else + attr = style_to_attr(&win->styles[UI_STYLE_CURSOR]); prev_style = NULL; } else if (l->cells[x].selected) { if (style->fg == selection_bg) |
