bubbletea/xterm.go
draw me an elephant 8b10e22689
fix: skip capability queries when input is disabled (#1801)
Co-authored-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>
2026-09-24 12:05:48 +04:00

23 lines
684 B
Go

package tea
// TerminalVersionMsg is a message that represents the terminal version.
type TerminalVersionMsg struct {
Name string
}
// String returns the terminal name as a string.
func (t TerminalVersionMsg) String() string {
return t.Name
}
// terminalVersion is an internal message that queries the terminal for its
// version using XTVERSION.
type terminalVersion struct{}
// RequestTerminalVersion is a command that queries the terminal for its
// version using XTVERSION. Note that some terminals may not support this
// command. Use [WithInput] to enable input, since the reply cannot be read
// otherwise.
func RequestTerminalVersion() Msg {
return terminalVersion{}
}