[PR #336] [CLOSED] Don't skip regions at end of line #912

Closed
opened 2026-03-04 01:08:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/336
Author: @SamWhited
Created: 8/24/2019
Status: Closed

Base: masterHead: fix_end_highlight


📝 Commits (1)

  • dbf8505 Don't skip regions at end of line

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 textview.go (+1 -1)

📄 Description

Currently if a region is the last thing on a line, it is skipped. eg. if the "highlight" region is highlighted, the entire text below will be highlighted even though it should have ended at the next region:

["highlight"]Test[""]

This is highlighted too.

This fixes an off-by-one issue that appears to have been causing the problem.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/336 **Author:** [@SamWhited](https://github.com/SamWhited) **Created:** 8/24/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix_end_highlight` --- ### 📝 Commits (1) - [`dbf8505`](https://github.com/rivo/tview/commit/dbf8505d84167b5e4583c58d20d21fb1e25c7ac7) Don't skip regions at end of line ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `textview.go` (+1 -1) </details> ### 📄 Description Currently if a region is the last thing on a line, it is skipped. eg. if the "highlight" region is highlighted, the entire text below will be highlighted even though it should have ended at the next region: ``` ["highlight"]Test[""] This is highlighted too. ``` This fixes an off-by-one issue that appears to have been causing the problem. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:32 +03:00
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#912
No description provided.