mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #312] Clear previously-drawn text on screen. #236
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#236
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?
Originally created by @iwasaki-kenta on GitHub (Jun 17, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/312
I noticed using a scrollable TextView that scrolled-over text is not cleared off of the screen once text I have written to the TextView exceeds the scrollable area.
Is there any way to forcefully clear the screen before drawing new text?
The view in particular is set to have a default color background.
@eu81273 commented on GitHub (Jun 18, 2019):
@iwasaki-kenta
This seems related with #270
I think tview has problem when BackgroundColor to set tcell.ColorDefault.
@iwasaki-kenta commented on GitHub (Jun 18, 2019):
That worked well, thanks 😄. Clearing the entire screen buffer is pretty expensive though; would be good for tview to perhaps manually clear tcell views where the background is
tcell.ColorDefault?@rivo commented on GitHub (Jul 10, 2019):
@eu81273 is right. This is `tcell.ColorDefault´'s description:
I don't see why clearing the screen buffer should be very expensive. It's just a virtual buffer and the real bottleneck is more likely in sending the characters to the terminal. But my understanding is that
tcelloptimizes for that, thus we have a lot of freedom to do with the buffer what we want.