Skip to content

Conversation

azat
Copy link
Contributor

@azat azat commented Jul 5, 2025

Using buffer.write().clear() over printer.clear() (which is self.buffer.write().fill(" ")) helps with properly clear the cursive screen area after invoking side TUI apps within it (i.e. vim)

Note, that this is not enough to clear the complete screen in case of using ShadowView.

Using `buffer.write().clear()` over `printer.clear()` (which is
`self.buffer.write().fill(" ")`) helps with properly clear the cursive
screen area after invoking side TUI apps within it (i.e. vim)

Note, that this is not enough to clear the complete screen in case of
using ShadowView.
azat added a commit to azat/chdig that referenced this pull request Jul 5, 2025
@gyscos
Copy link
Owner

gyscos commented Jul 25, 2025

Hi, and thanks for the work!

I'm just concerned that this would cause excessive I/O in most cases. Maybe we need a different function specifically for when another application may have messed up the screen.

@azat
Copy link
Contributor Author

azat commented Jul 26, 2025

Hi @gyscos!

I will be OK with a separate method, but AFAICS the clear is not a hot path, and usually called explicitly by user

@azat
Copy link
Contributor Author

azat commented Jul 26, 2025

This is an example for a problem - #831 (press e then exit from editor and then c - nothing will be cleared), hope this will help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants