mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05:00
url-mode: damage current view before entering URL mode
Clear scroll damage and damage the entire viewport before entering URL mode. This will cause us to do a full screen redraw both when entering URL mode, and later when exiting it. Clearing the scroll damage is necessary to ensure we don’t apply it twice (once for the snapshot:ed grid, and later again for the real grid), as that would result in an incorrect pixmap. But, since we’ve cleared the scroll damage, we need to damage the entire view to ensure we redraw the contents correctly.
This commit is contained in:
parent
3c123425fb
commit
ae0f20a536
1 changed files with 8 additions and 0 deletions
|
|
@ -648,6 +648,14 @@ urls_render(struct terminal *term)
|
|||
}
|
||||
term->render.last_cursor.row = NULL;
|
||||
|
||||
/* Clear scroll damage, to ensure we don’t apply it twice (once on
|
||||
* the snapshot:ed grid, and then later again on the real grid) */
|
||||
tll_free(term->grid->scroll_damage);
|
||||
|
||||
/* Damage the entire view, to ensure a full screen redraw, both
|
||||
* now, when entering URL mode, and later, when exiting it. */
|
||||
term_damage_view(term);
|
||||
|
||||
/* Snapshot the current grid */
|
||||
term->url_grid_snapshot = grid_snapshot(term->grid);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue