[PR #753] [MERGED] fix: fixed GetRegionText when colors are active #1034

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

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/753
Author: @sruehl
Created: 8/5/2022
Status: Merged
Merged: 9/6/2022
Merged by: @rivo

Base: masterHead: fix/textview_color_panic


📝 Commits (1)

  • ac98385 fix: fixed GetRegionText when colors are active

📊 Changes

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

View changed files

📝 textview.go (+3 -2)

📄 Description

This PR fixes https://github.com/rivo/tview/issues/751

When skipping color tags the currentTag is getting incremented and directly after that a index access with that happens. This always crashes on the last tag.

Without this fix GetRegionText is unusable when color is active


🔄 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/753 **Author:** [@sruehl](https://github.com/sruehl) **Created:** 8/5/2022 **Status:** ✅ Merged **Merged:** 9/6/2022 **Merged by:** [@rivo](https://github.com/rivo) **Base:** `master` ← **Head:** `fix/textview_color_panic` --- ### 📝 Commits (1) - [`ac98385`](https://github.com/rivo/tview/commit/ac98385e86991103fd971e79ee865e7d2712ecbf) fix: fixed GetRegionText when colors are active ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `textview.go` (+3 -2) </details> ### 📄 Description This PR fixes https://github.com/rivo/tview/issues/751 When skipping color tags the `currentTag` is getting incremented and directly after that a index access with that happens. This always crashes on the last tag. Without this fix `GetRegionText` is unusable when color is active --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:09:07 +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#1034
No description provided.