mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[PR #641] [CLOSED] Make TextView.Clear safe #1003
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#1003
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/rivo/tview/pull/641
Author: @sachaos
Created: 9/9/2021
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
7f6f0b8Make TextView.Clear safe📊 Changes
1 file changed (+2 additions, -0 deletions)
View changed files
📝
textview.go(+2 -0)📄 Description
Fix https://github.com/rivo/tview/issues/636
I think the problem is TextView.Clear is not locking.
When we clear the TextView, the buffer will be nil.
So call Clear while drawing buffer, it will panic with that stack trace.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.