mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-07 04:06:07 -05:00
render: resize: no need to clear the selection - just truncate if necessary
This commit is contained in:
parent
ef52ed8a10
commit
5509fe514a
1 changed files with 6 additions and 2 deletions
8
render.c
8
render.c
|
|
@ -1711,8 +1711,6 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
|||
if (!force && width == term->width && height == term->height && scale == term->scale)
|
||||
return false;
|
||||
|
||||
selection_cancel(term);
|
||||
|
||||
/* Cancel an application initiated "Synchronized Update" */
|
||||
term_disable_app_sync_updates(term);
|
||||
|
||||
|
|
@ -1814,6 +1812,12 @@ damage_view:
|
|||
term->height / term->scale + title_height);
|
||||
}
|
||||
|
||||
/* Make sure selection is within bounds */
|
||||
term->selection.start.row = min(term->selection.start.row, term->rows - 1);
|
||||
term->selection.start.col = min(term->selection.start.col, term->cols - 1);
|
||||
term->selection.end.row = min(term->selection.end.row, term->rows - 1);
|
||||
term->selection.end.col = min(term->selection.end.col, term->cols - 1);
|
||||
|
||||
tll_free(term->normal.scroll_damage);
|
||||
tll_free(term->alt.scroll_damage);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue