diff --git a/src/termio/Exec.zig b/src/termio/Exec.zig index 1864e4d7a..157659a76 100644 --- a/src/termio/Exec.zig +++ b/src/termio/Exec.zig @@ -379,20 +379,12 @@ pub fn clearScreen(self: *Exec, history: bool) !void { // Clear our scrollback if (history) try self.terminal.screen.clear(.history); - // If we're not at a prompt, we clear the screen manually using - // the terminal screen state. If we are at a prompt, we send - // form-feed so that the shell can repaint the entire screen. - if (!self.terminal.cursorIsAtPrompt()) { - // Clear above the cursor - try self.terminal.screen.clear(.above_cursor); - - // Exit - return; - } + // Clear our screen using terminal state. + try self.terminal.screen.clear(.above_cursor); } - // If we reached here it means we're at a prompt, so we send a form-feed. - assert(self.terminal.cursorIsAtPrompt()); + // We also always send form feed so that the terminal can repaint + // our prompt. try self.queueWrite(&[_]u8{0x0C}); }