terminal: end hyperlink state when switching screens

This commit is contained in:
Mitchell Hashimoto
2024-07-04 20:01:07 -07:00
parent 8b02d3430c
commit ff9ab70091

View File

@ -2473,6 +2473,9 @@ pub fn alternateScreen(
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);
} }
@ -2506,6 +2509,9 @@ pub fn primaryScreen(
// 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();
// Restore the cursor from the primary screen. This should not // Restore the cursor from the primary screen. This should not
// fail because we should not have to allocate memory since swapping // fail because we should not have to allocate memory since swapping
// screens does not create new cursors. // screens does not create new cursors.