mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-27 03:15:55 +03:00
[PR #294] [MERGED] Implements a buffer limit for the Text widget #310
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#310
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mum4k/termdash/pull/294
Author: @timbutler
Created: 2/15/2021
Status: ✅ Merged
Merged: 4/3/2021
Merged by: @mum4k
Base:
bufferlimit← Head:bufferlimit📝 Commits (5)
057d30fAdded a maxContent length for the text widget239035aFixed the tests1798313Corrected some of the logic1f646d4Increase verbosity of the comments453470bUpdated tests📊 Changes
3 files changed (+143 additions, -0 deletions)
View changed files
📝
widgets/text/options.go(+17 -0)📝
widgets/text/text.go(+20 -0)📝
widgets/text/text_test.go(+106 -0)📄 Description
See issue #293 where memory and performance can degrade with a high number of lines written to the Text widget.
This is a very simplistic implementation to limit the possible length the text buffer can grow to with the
maxContentoption.Default value of -1 means there's no limit and therefore behaviour should remain standard.
It has been working in our test app and allows the use of the Text widget to monitor logs (ie tail) and therefore doesn't bloat over time, but happy to adjust as required.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.