mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 17:26:09 +03:00
termio/exec: only clear above cursor if cursor is not on y=0
This commit is contained in:
@ -478,11 +478,14 @@ pub fn clearScreen(self: *Exec, history: bool) !void {
|
|||||||
|
|
||||||
// If we're not at a prompt, we just delete above the cursor.
|
// If we're not at a prompt, we just delete above the cursor.
|
||||||
if (!self.terminal.cursorIsAtPrompt()) {
|
if (!self.terminal.cursorIsAtPrompt()) {
|
||||||
|
if (self.terminal.screen.cursor.y > 0) {
|
||||||
self.terminal.screen.clearRows(
|
self.terminal.screen.clearRows(
|
||||||
.{ .active = .{ .y = 0 } },
|
.{ .active = .{ .y = 0 } },
|
||||||
.{ .active = .{ .y = self.terminal.screen.cursor.y - 1 } },
|
.{ .active = .{ .y = self.terminal.screen.cursor.y - 1 } },
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user