diff --git a/CHANGELOG.md b/CHANGELOG.md index 963e715032..37bf0f4f2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed `Content.expand_tabs` https://github.com/Textualize/textual/pull/6038 - Fixed return value for `Pilot.double_click` and `Pilot.triple_click` https://github.com/Textualize/textual/pull/6035 - Fixed sizing issue with `Pretty` widget https://github.com/Textualize/textual/pull/6040 https://github.com/Textualize/textual/pull/6041 +- Fixed garbled inline app output when `inline_no_clear=True` https://github.com/Textualize/textual/pull/6080 ### Added diff --git a/src/textual/app.py b/src/textual/app.py index c3b6b5e9a4..f088bab1b9 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -3294,8 +3294,9 @@ async def invoke_ready_callback() -> None: if self._driver.is_inline: cursor_x, cursor_y = self._previous_cursor_position self._driver.write( - Control.move(-cursor_x, -cursor_y + 1).segment.text + Control.move(-cursor_x, -cursor_y).segment.text ) + self._driver.flush() if inline_no_clear and not self.app._exit_renderables: console = Console() try: @@ -3304,9 +3305,7 @@ async def invoke_ready_callback() -> None: console.print() else: self._driver.write( - Control.move( - -cursor_x, -self.INLINE_PADDING - 1 - ).segment.text + Control.move(0, -self.INLINE_PADDING).segment.text ) driver.stop_application_mode()