Skip to content

Commit de698bb

Browse files
authored
Merge pull request #6196 from TomJGooding/fix-text-area-fix-cursor-on-wrapped-line
fix(text area): fix cursor display on wrapped line
2 parents e314bfd + b09c560 commit de698bb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## Unreleased
9+
10+
### Fixed
11+
12+
- Fixed `TextArea` cursor display on wrapped lines https://github.com/Textualize/textual/pull/6196
13+
814
## [6.5.0] - 2025-10-31
915

1016
### Added

src/textual/widgets/_text_area.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,7 @@ def render_line(self, y: int) -> Strip:
12291229
scroll_x, scroll_y = self.scroll_offset
12301230
absolute_y = scroll_y + y
12311231
selection = self.selection
1232+
_, cursor_y = self._cursor_offset
12321233
cache_key = (
12331234
self.size,
12341235
scroll_x,
@@ -1243,7 +1244,7 @@ def render_line(self, y: int) -> Strip:
12431244
if (
12441245
self._cursor_visible
12451246
and self.cursor_blink
1246-
and absolute_y == selection.end[0]
1247+
and absolute_y == cursor_y
12471248
)
12481249
else None
12491250
),

0 commit comments

Comments
 (0)