vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 4d2951eabd495d53af4ae516514d76c9c9f4ba0d
parent f10e25b5cbcc91974284c4cf8c98e03722b4b5ee
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed, 18 Mar 2020 08:48:40 +0100

Merge branch 'single-cursor-is-primary' of https://github.com/3dc1d3/vis

Diffstat:
Mvis.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vis.c b/vis.c @@ -407,7 +407,6 @@ static void window_draw_cursor(Win *win, Selection *cur, CellStyle *style, CellS static void window_draw_selections(Win *win) { View *view = win->view; Filerange viewport = view_viewport_get(view); - bool multiple_cursors = view_selections_count(view) > 1; Selection *sel = view_selections_primary_get(view); CellStyle style_cursor = win->ui->style_get(win->ui, UI_STYLE_CURSOR); CellStyle style_cursor_primary = win->ui->style_get(win->ui, UI_STYLE_CURSOR_PRIMARY); @@ -420,7 +419,7 @@ static void window_draw_selections(Win *win) { window_draw_cursor(win, s, &style_cursor, &style_selection); } window_draw_selection(win->view, sel, &style_selection); - window_draw_cursor(win, sel, multiple_cursors ? &style_cursor_primary : &style_cursor, &style_selection); + window_draw_cursor(win, sel, &style_cursor_primary, &style_selection); for (Selection *s = view_selections_next(sel); s; s = view_selections_next(s)) { window_draw_selection(win->view, s, &style_selection); size_t pos = view_cursors_pos(s);