diff --git a/src/textual/drivers/linux_inline_driver.py b/src/textual/drivers/linux_inline_driver.py index 783fdaf26d..cbe663691f 100644 --- a/src/textual/drivers/linux_inline_driver.py +++ b/src/textual/drivers/linux_inline_driver.py @@ -306,7 +306,8 @@ def stop_application_mode(self) -> None: self._disable_bracketed_paste() self.disable_input() - self.write("\x1b[2A\x1b[J") + back_lines = max(self._app.INLINE_PADDING, 0) + 1 + self.write(f"\x1b[{back_lines}A\x1b[J") if self.attrs_before is not None: try: