[GH-ISSUE #124] Text widget should allow atomic content replace #79

Closed
opened 2026-03-03 16:22:11 +03:00 by kerem · 0 comments
Owner

Originally created by @mum4k on GitHub (Feb 15, 2019).
Original GitHub issue: https://github.com/mum4k/termdash/issues/124

The Write method currently only appends text:

github.com/mum4k/termdash@34fe013ca6/widgets/text/text.go (L101)

If the user wants to replace the content they need to call Reset followed by Write.
github.com/mum4k/termdash@34fe013ca6/widgets/text/text.go (L82)

This is racy as a redraw might happen in between. We should provide an option that when provided will change the behavior of Write to atomically Reset+Write.

Originally created by @mum4k on GitHub (Feb 15, 2019). Original GitHub issue: https://github.com/mum4k/termdash/issues/124 The Write method currently only appends text: https://github.com/mum4k/termdash/blob/34fe013ca66df93df75868f43386db104c9f1700/widgets/text/text.go#L101 If the user wants to replace the content they need to call Reset followed by Write. https://github.com/mum4k/termdash/blob/34fe013ca66df93df75868f43386db104c9f1700/widgets/text/text.go#L82 This is racy as a redraw might happen in between. We should provide an option that when provided will change the behavior of Write to atomically Reset+Write.
kerem 2026-03-03 16:22:11 +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/termdash#79
No description provided.