diff options
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -98,6 +98,12 @@ coord_is_selected(const struct terminal *term, int col, int row) const struct coord *start = &term->selection.start; const struct coord *end = &term->selection.end; + if (start->row > end->row || (start->row == end->row && start->col > end->col)) { + const struct coord *tmp = start; + start = end; + end = tmp; + } + assert(start->row <= end->row); row += term->grid->view; |
