aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-03-10 21:55:41 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-03-10 22:36:54 +0100
commit0e322d577bf834d8f7c9a7d3c53a58f8e7bb93c1 (patch)
treeeefe6bbc9eb8ce96d71cd8b857cace4caa662507 /view.c
parent650ef03aa0529f7b69e4757697f161258b07ef1d (diff)
downloadvis-0e322d577bf834d8f7c9a7d3c53a58f8e7bb93c1.tar.gz
vis-0e322d577bf834d8f7c9a7d3c53a58f8e7bb93c1.tar.xz
ui: make primary cursor blink
Diffstat (limited to 'view.c')
-rw-r--r--view.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/view.c b/view.c
index fb3a4a7..05fbaf3 100644
--- a/view.c
+++ b/view.c
@@ -235,6 +235,9 @@ bool view_syntax_set(View *view, const char *name) {
lua_getfield(L, -1, "STYLE_CURSOR");
view->ui->syntax_style(view->ui, UI_STYLE_CURSOR, lua_tostring(L, -1));
lua_pop(L, 1);
+ lua_getfield(L, -1, "STYLE_CURSOR_PRIMARY");
+ view->ui->syntax_style(view->ui, UI_STYLE_CURSOR_PRIMARY, lua_tostring(L, -1));
+ lua_pop(L, 1);
lua_getfield(L, -1, "STYLE_CURSOR_LINE");
view->ui->syntax_style(view->ui, UI_STYLE_CURSOR_LINE, lua_tostring(L, -1));
lua_pop(L, 1);
@@ -610,6 +613,7 @@ void view_draw(View *view) {
size_t pos = view_cursors_pos(c);
if (view_coord_get(view, pos, &c->line, &c->row, &c->col)) {
c->line->cells[c->col].cursor = true;
+ c->line->cells[c->col].cursor_primary = (c == view->cursor);
if (view->ui && !c->sel) {
Line *line_match; int col_match;
size_t pos_match = text_bracket_match_symbol(view->text, pos, "(){}[]\"'`");