Skip to content

Commit d55410c

Browse files
authored
Text area flicker fix (#4334)
1 parent ea81389 commit d55410c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Fixed a crash in `TextArea` when undoing an edit to a selection the selection was made backwards https://github.com/Textualize/textual/issues/4301
1313
- Fixed issue with flickering scrollbars https://github.com/Textualize/textual/pull/4315
14+
- Fixed issue where narrow TextArea would repeatedly wrap due to scrollbar appearing/disappearing https://github.com/Textualize/textual/pull/4334
1415
- Fix progress bar ETA not updating when setting `total` reactive https://github.com/Textualize/textual/pull/4316
1516

1617
### Changed

src/textual/widgets/_text_area.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,8 @@ def _watch_indent_width(self) -> None:
688688
self.scroll_cursor_visible()
689689

690690
def _watch_show_vertical_scrollbar(self) -> None:
691-
self._rewrap_and_refresh_virtual_size()
691+
if self.wrap_width:
692+
self._rewrap_and_refresh_virtual_size()
692693
self.scroll_cursor_visible()
693694

694695
def _watch_theme(self, theme: str) -> None:

0 commit comments

Comments
 (0)