Skip to content

Commit

Permalink
vis: only draw selections of currently active window
Browse files Browse the repository at this point in the history
This should make it easier to see which window is focused.
  • Loading branch information
martanne committed Jul 23, 2017
1 parent ce41857 commit 33b0513
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 33b0513

Please sign in to comment.