[GH-ISSUE #531] [Bug] Selecting highlights with mouse doesn't work properly #387

Closed
opened 2026-03-04 01:04:33 +03:00 by kerem · 4 comments
Owner

Originally created by @normen on GitHub (Nov 19, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/531

It seems a click on a TextView in a grid layout always selects the topmost visible region.

To reproduce:

  • add a grid layout
  • add a textview
  • add enough paragraphs/regions with highlight IDs to the text view
  • click on a region in the bottom of the text view
  • the topmost row is selected

Maybe I missed something..?

Cheers,
Normen

Originally created by @normen on GitHub (Nov 19, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/531 It seems a click on a TextView in a grid layout always selects the topmost visible region. To reproduce: - add a grid layout - add a textview - add enough paragraphs/regions with highlight IDs to the text view - click on a region in the bottom of the text view - the topmost row is selected Maybe I missed something..? Cheers, Normen
kerem closed this issue 2026-03-04 01:04:33 +03:00
Author
Owner

@rivo commented on GitHub (Dec 4, 2020):

I tried this but could not reproduce it. Could you please paste a short program that illustrates this?

<!-- gh-comment-id:738838886 --> @rivo commented on GitHub (Dec 4, 2020): I tried this but could not reproduce it. Could you please paste a short program that illustrates this?
Author
Owner

@normen commented on GitHub (Dec 4, 2020):

Hmm.. You're right, I tried and I couldn't, it worked as expected.. Must be something in my code then o_O Just wondering what - I don't do much different really..

<!-- gh-comment-id:739007807 --> @normen commented on GitHub (Dec 4, 2020): Hmm.. You're right, I tried and I couldn't, it worked as expected.. Must be something in my code then o_O Just wondering what - I don't do much different really..
Author
Owner

@edlanda commented on GitHub (Mar 4, 2021):

It appears that having a region terminate at EOL triggers this. To reproduce:

  • Edit tview/demos/presentation/textview.go
  • Insert a line to textView2 const, something like: ["99"]foo[""]
  • All regions following the insertion are unselectable and clicking on them selects region 99.
  • Adding a character after the closing region tag causes correct behavior.
<!-- gh-comment-id:790826324 --> @edlanda commented on GitHub (Mar 4, 2021): It appears that having a region terminate at EOL triggers this. To reproduce: - Edit tview/demos/presentation/textview.go - Insert a line to textView2 const, something like: ["99"]foo[""] - All regions following the insertion are unselectable and clicking on them selects region 99. - Adding a character after the closing region tag causes correct behavior.
Author
Owner

@rivo commented on GitHub (Apr 27, 2021):

Thanks, that was helpful. I believe the latest commit should fix this. If it doesn't, please reopen this issue.

<!-- gh-comment-id:827370034 --> @rivo commented on GitHub (Apr 27, 2021): Thanks, that was helpful. I believe the latest commit should fix this. If it doesn't, please reopen this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#387
No description provided.