diff --git a/CHANGELOG.md b/CHANGELOG.md index e4de299317..9cd73d4616 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## Unreleased + +### Fixed + +- Fixed `TextArea` cursor display on wrapped lines https://github.com/Textualize/textual/pull/6196 + ## [6.5.0] - 2025-10-31 ### Added diff --git a/src/textual/widgets/_text_area.py b/src/textual/widgets/_text_area.py index 67da60ee61..5ef4dc9066 100644 --- a/src/textual/widgets/_text_area.py +++ b/src/textual/widgets/_text_area.py @@ -1229,6 +1229,7 @@ def render_line(self, y: int) -> Strip: scroll_x, scroll_y = self.scroll_offset absolute_y = scroll_y + y selection = self.selection + _, cursor_y = self._cursor_offset cache_key = ( self.size, scroll_x, @@ -1243,7 +1244,7 @@ def render_line(self, y: int) -> Strip: if ( self._cursor_visible and self.cursor_blink - and absolute_y == selection.end[0] + and absolute_y == cursor_y ) else None ),