mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
When showing/hiding the cursor operate on the program's io.Writer
Previously we were operating on io.Stdout.
This commit is contained in:
committed by
Christian Rocha
parent
f5fde56af0
commit
6d70abd7d5
@@ -7,6 +7,14 @@ import (
|
||||
te "github.com/muesli/termenv"
|
||||
)
|
||||
|
||||
func hideCursor(w io.Writer) {
|
||||
fmt.Fprintf(w, te.CSI+te.HideCursorSeq)
|
||||
}
|
||||
|
||||
func showCursor(w io.Writer) {
|
||||
fmt.Fprintf(w, te.CSI+te.ShowCursorSeq)
|
||||
}
|
||||
|
||||
func clearLine(w io.Writer) {
|
||||
fmt.Fprintf(w, te.CSI+te.EraseLineSeq, 2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user