fix: renderer: make sure to move the cursor to the top left corner after clearing the screen
This commit is contained in:
parent
96c871b934
commit
51536c04b0
1 changed files with 2 additions and 0 deletions
|
|
@ -152,7 +152,9 @@ func (s *cursedRenderer) resize(w, h int) {
|
|||
// clearScreen implements renderer.
|
||||
func (s *cursedRenderer) clearScreen() {
|
||||
s.mu.Lock()
|
||||
// Clear the screen and move the cursor to the top left corner.
|
||||
s.scr.Clear()
|
||||
io.WriteString(s.w, ansi.CursorHomePosition) //nolint:errcheck
|
||||
repaint(s)
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue