[PR #452] [CLOSED] TextView: Add SetMaxLines() #959

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

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/452
Author: @jpeletier
Created: 5/31/2020
Status: Closed

Base: masterHead: setmaxlines


📝 Commits (1)

  • 89469ee TextView: Add SetMaxLines()

📊 Changes

2 files changed (+82 additions, -0 deletions)

View changed files

📝 textview.go (+25 -0)
textview_test.go (+57 -0)

📄 Description

Fixes #451

This PR implements a new method TextView.SetMaxLines() that limits the amount of lines that can be added to a buffer. This is useful to use TextView to show scrolling content, such as log output.

If this method is not used, the default is "no limit", thus this method is backward-compatible and does not affect existing behavior of the TextView


🔄 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/452 **Author:** [@jpeletier](https://github.com/jpeletier) **Created:** 5/31/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `setmaxlines` --- ### 📝 Commits (1) - [`89469ee`](https://github.com/rivo/tview/commit/89469ee71398d63057d459fd34f71b075c0d15b9) TextView: Add SetMaxLines() ### 📊 Changes **2 files changed** (+82 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `textview.go` (+25 -0) ➕ `textview_test.go` (+57 -0) </details> ### 📄 Description Fixes #451 This PR implements a new method `TextView.SetMaxLines()` that limits the amount of lines that can be added to a buffer. This is useful to use TextView to show scrolling content, such as log output. If this method is not used, the default is "no limit", thus this method is backward-compatible and does not affect existing behavior of the TextView --- <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:45 +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#959
No description provided.