Use termenv for terminal control

This commit is contained in:
Christian Muehlhaeuser
2020-01-31 13:50:42 +01:00
parent 23f5f33283
commit c25e6266d9
3 changed files with 13 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ import (
"time"
"github.com/charmbracelet/tea"
"github.com/muesli/termenv"
)
type Model struct {
@@ -110,7 +112,7 @@ func cursor(s string, blink bool) string {
if blink {
return s
}
return tea.Invert(s)
return termenv.String(s).Reverse().String()
}
// Subscription