Skip to content

Conversation

@TomJGooding
Copy link
Collaborator

@TomJGooding TomJGooding commented Oct 28, 2025

Currently the TextArea cursor display is broken when trying to navigate a wrapped line:

  • Clicking a wrapped line will cause the cursor to disappear
  • Keyboard navigation on a wrapped line won't blink the cursor

The problem is that the line cache introduced in ec0c050 doesn't properly account for wrapped lines.

Fix the cache key so the 'cursor location' element is not simply based on a location in document-space.

Fixes #6195

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

Currently the `TextArea` cursor display is broken when trying to
navigate a wrapped line:

- Clicking a wrapped line will cause the cursor to disappear
- Keyboard navigation on a wrapped line won't blink the cursor

The problem is that the line cache introduced in ec0c050 doesn't
properly account for wrapped lines.

Fix the cache key so the 'cursor location' element is not simply based
on a location in document-space.

Fixes Textualize#6195
@TomJGooding
Copy link
Collaborator Author

Since these issues depend on the cursor blink, I'm not sure it's possible to add any regression test for this?

@TomJGooding TomJGooding marked this pull request as ready for review October 30, 2025 16:22
@willmcgugan
Copy link
Member

Thanks Tom. I couldn't quite manage a failing test myself. But this does seem to be the fix.

@willmcgugan willmcgugan merged commit de698bb into Textualize:main Nov 3, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor missing when clicking in Text Area

2 participants