From 0e322d577bf834d8f7c9a7d3c53a58f8e7bb93c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 10 Mar 2016 21:55:41 +0100 Subject: ui: make primary cursor blink --- view.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'view.c') 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, "(){}[]\"'`"); -- cgit v1.2.3