Skip to content

Commit fd14d10

Browse files
authored
Merge pull request #6080 from TomJGooding/fix-garbled-inline-output
fix(app): fix garbled inline app output
2 parents c4b4bec + 4474bbf commit fd14d10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313
- Fixed `Content.expand_tabs` https://github.com/Textualize/textual/pull/6038
1414
- Fixed return value for `Pilot.double_click` and `Pilot.triple_click` https://github.com/Textualize/textual/pull/6035
1515
- Fixed sizing issue with `Pretty` widget https://github.com/Textualize/textual/pull/6040 https://github.com/Textualize/textual/pull/6041
16+
- Fixed garbled inline app output when `inline_no_clear=True` https://github.com/Textualize/textual/pull/6080
1617

1718
### Added
1819

src/textual/app.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3320,8 +3320,9 @@ async def invoke_ready_callback() -> None:
33203320
if self._driver.is_inline:
33213321
cursor_x, cursor_y = self._previous_cursor_position
33223322
self._driver.write(
3323-
Control.move(-cursor_x, -cursor_y + 1).segment.text
3323+
Control.move(-cursor_x, -cursor_y).segment.text
33243324
)
3325+
self._driver.flush()
33253326
if inline_no_clear and not self.app._exit_renderables:
33263327
console = Console()
33273328
try:
@@ -3330,9 +3331,7 @@ async def invoke_ready_callback() -> None:
33303331
console.print()
33313332
else:
33323333
self._driver.write(
3333-
Control.move(
3334-
-cursor_x, -self.INLINE_PADDING - 1
3335-
).segment.text
3334+
Control.move(0, -self.INLINE_PADDING).segment.text
33363335
)
33373336

33383337
driver.stop_application_mode()

0 commit comments

Comments
 (0)