fix: selected text remains after clear_screen action (#4040)

Fixes #3414
This commit is contained in:
Mitchell Hashimoto
2025-01-02 13:50:09 -08:00
committed by GitHub

View File

@ -466,6 +466,9 @@ pub fn clearScreen(self: *Termio, td: *ThreadData, history: bool) !void {
// for alt screen, we do nothing.
if (self.terminal.active_screen == .alternate) return;
// Clear our selection
self.terminal.screen.clearSelection();
// Clear our scrollback
if (history) self.terminal.eraseDisplay(.scrollback, false);