From 33b0513d5e02019a777ec5e06c1a751fd7aeefaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 23 Jul 2017 17:06:17 +0200 Subject: vis: only draw selections of currently active window This should make it easier to see which window is focused. --- vis.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 1ce9cba..f1bc7f3 100644 --- a/vis.c +++ b/vis.c @@ -393,7 +393,7 @@ static void window_draw_cursor(Win *win, Selection *cur, CellStyle *style, CellS return; } -static void window_draw_cursors(Win *win) { +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; @@ -438,7 +438,8 @@ void vis_window_draw(Win *win) { window_draw_colorcolumn(win); window_draw_cursorline(win); - window_draw_cursors(win); + if (!vis->win || vis->win == win || vis->win->parent == win) + window_draw_selections(win); window_draw_eof(win); vis_event_emit(vis, VIS_EVENT_WIN_STATUS, win); -- cgit v1.2.3