selection: bug: apply grid's view offset when starting a selection

This commit is contained in:
Daniel Eklöf 2019-07-17 12:59:12 +02:00
parent 20684afa8c
commit f669cce5b9
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -97,7 +97,7 @@ selection_start(struct terminal *term, int col, int row)
selection_cancel(term);
LOG_DBG("selection started at %d,%d", row, col);
term->selection.start = (struct coord){col, row};
term->selection.start = (struct coord){col, term->grid->view + row};
term->selection.end = (struct coord){-1, -1};
}