Terminal: release hyperlink before copying cursor when switching screen

To avoid an unnecessary copy.
This commit is contained in:
Qwerasd
2024-08-22 20:57:37 -04:00
parent 170f55aa84
commit 38bb9b40a6

View File

@ -2472,14 +2472,14 @@ pub fn alternateScreen(
// Mark our terminal as dirty // Mark our terminal as dirty
self.flags.dirty.clear = true; self.flags.dirty.clear = true;
// We always end hyperlink state
self.screen.endHyperlink();
// Bring our pen with us // Bring our pen with us
self.screen.cursorCopy(old.cursor) catch |err| { self.screen.cursorCopy(old.cursor) catch |err| {
log.warn("cursor copy failed entering alt screen err={}", .{err}); log.warn("cursor copy failed entering alt screen err={}", .{err});
}; };
// We always end hyperlink state
self.screen.endHyperlink();
if (options.clear_on_enter) { if (options.clear_on_enter) {
self.eraseDisplay(.complete, false); self.eraseDisplay(.complete, false);
} }