diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-07-23 17:06:17 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-07-23 17:06:36 +0200 |
| commit | 33b0513d5e02019a777ec5e06c1a751fd7aeefaa (patch) | |
| tree | 55c8339f3bd061427a087546ba0e1d000ebfb5e3 | |
| parent | ce4185782b5237aafa3de236a3f67d2a613b4f96 (diff) | |
| download | vis-33b0513d5e02019a777ec5e06c1a751fd7aeefaa.tar.gz vis-33b0513d5e02019a777ec5e06c1a751fd7aeefaa.tar.xz | |
vis: only draw selections of currently active window
This should make it easier to see which window is focused.
| -rw-r--r-- | vis.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |
