diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-02-24 20:39:29 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-02-26 08:15:46 +0000 |
| commit | ae0f20a53603c3e3657cbab5c548575d4d1147bb (patch) | |
| tree | 5cc8bbe69d71035cb846fc2030db272ddba024ac | |
| parent | command: scrollback: don’t allow scrolling in URL mode (diff) | |
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.
| -rw-r--r-- | url-mode.c | 8 |
1 files changed, 8 insertions, 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); |
