aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-22 09:22:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-26 08:15:45 +0000
commit54b5ae95c1bb01c5103b3ce97a8faebe75e142bb (patch)
tree3cdb572a14b19366063a3d6d73d6ed8279bf5f4e /terminal.c
parentgrid: add grid_snapshot() (diff)
url-mode: snapshot screen state when entering URL mode
Previously, we automatically exited URL mode whenever we received data on the PTY. This was done since we don’t know _what_ has changed on the screen, and we don’t want to display misleading jump labels. However, this becomes a problem in curses-like applications that periodically updates part of the screen. For example, a statusbar with a clock. This patch changes this behavior; instead of cancelling URL mode when receiving PTY data, we snapshot the grid when entering URL mode. When *rendering*, we use the snapshot:ed grid, while PTY updates modify the “real” grid. Snapshot:ing the grid means taking a full/deep copy of the current grid, including sixel images etc. Finally, it isn’t necessary to “damage” the entire view when *entering* URL mode, since we’re at that point the renderer is in sync with the grid. But we *do* need to damage the entire view when exiting URL mode, since the grid changes on the “real” grid hasn’t been tracked by the renderer.
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/terminal.c b/terminal.c
index 57c9ae18..ac127851 100644
--- a/terminal.c
+++ b/terminal.c
@@ -227,8 +227,6 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
cursor_blink_rearm_timer(term);
}
- urls_reset(term);
-
uint8_t buf[24 * 1024];
ssize_t count = sizeof(buf);