Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bubbletea/tea_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"github.com/charmbracelet/ssh"
"github.com/charmbracelet/x/ansi"
"github.com/charmbracelet/x/input"
"github.com/charmbracelet/x/term"
"github.com/lucasb-eyer/go-colorful"
"github.com/muesli/termenv"
)
Expand Down Expand Up @@ -45,7 +46,11 @@
termenv.WithEnvironment(env),
termenv.WithColorCache(true),
)
bg, _ = queryBackgroundColor(pty.Slave, pty.Slave)
state, err := term.MakeRaw(pty.Slave.Fd())
if err == nil {
bg, _ = queryBackgroundColor(pty.Slave, pty.Slave)
term.Restore(pty.Slave.Fd(), state)

Check failure on line 52 in bubbletea/tea_unix.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `term.Restore` is not checked (errcheck)

Check failure on line 52 in bubbletea/tea_unix.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `term.Restore` is not checked (errcheck)
}
} else {
r = lipgloss.NewRenderer(
s,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/charmbracelet/ssh v0.0.0-20240725163421-eb71b85b27aa
github.com/charmbracelet/x/ansi v0.4.0
github.com/charmbracelet/x/input v0.2.0
github.com/charmbracelet/x/term v0.2.0
github.com/go-git/go-git/v5 v5.12.0
github.com/google/go-cmp v0.6.0
github.com/hashicorp/golang-lru/v2 v2.0.7
Expand All @@ -29,7 +30,6 @@ require (
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/charmbracelet/x/conpty v0.1.0 // indirect
github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86 // indirect
github.com/charmbracelet/x/term v0.2.0 // indirect
github.com/charmbracelet/x/termios v0.1.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/creack/pty v1.1.21 // indirect
Expand Down
Loading