aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-03-18 08:48:40 +0100
committerMarc André Tanner <mat@brain-dump.org>2020-03-18 08:48:40 +0100
commit08a550deac6f55f32f131f66992994b3944011ce (patch)
tree1c8b6f964a36c8ef798a326e4c8ee10ba1e8e00a
parentbae3c238adad2b9bbfc6a8ad340caab1c6149ed4 (diff)
parent087ca3a7fdb9c0d35d31780b1836b6d8608f05b9 (diff)
downloadvis-08a550deac6f55f32f131f66992994b3944011ce.tar.gz
vis-08a550deac6f55f32f131f66992994b3944011ce.tar.xz
Merge branch 'single-cursor-is-primary' of https://github.com/3dc1d3/vis
-rw-r--r--vis.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vis.c b/vis.c
index 72447a1..768c3cb 100644
--- 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);