Skip to content

Commit ea8d69b

Browse files
committed
fix textarea scrollbar refresh
1 parent 8624538 commit ea8d69b

File tree

3 files changed

+175
-1
lines changed

3 files changed

+175
-1
lines changed

src/textual/widgets/_text_area.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,7 @@ def _refresh_size(self) -> None:
11581158
# +1 width to make space for the cursor resting at the end of the line
11591159
width, height = self.document.get_size(self.indent_width)
11601160
self.virtual_size = Size(width + self.gutter_width + 1, height)
1161+
self._refresh_scrollbars()
11611162

11621163
@property
11631164
def _draw_cursor(self) -> bool:
@@ -1561,11 +1562,11 @@ def edit(self, edit: Edit) -> EditResult:
15611562
result.end_location,
15621563
)
15631564

1564-
self._refresh_size()
15651565
edit.after(self)
15661566
self._build_highlight_map()
15671567
self.post_message(self.Changed(self))
15681568
self.update_suggestion()
1569+
self._refresh_size()
15691570
return result
15701571

15711572
def undo(self) -> None:

0 commit comments

Comments
 (0)