xterm.go
This file
Path
xterm.go
23 lines · 684 bytes · Go
Last changed by
fix: skip capability queries when input is disabled (#1801)draw me an elephantbefore adoption8b10e22
History of this fileTake it
Merge pull request #1118 from charmbracelet/v2-expAyman Bagabasbefore adoptiond1c8c97
lines 1–18why, one step back1package tea23// TerminalVersionMsg is a message that represents the terminal version.4type TerminalVersionMsg struct {5 Name string6}78// String returns the terminal name as a string.9func (t TerminalVersionMsg) String() string {10 return t.Name11}1213// terminalVersion is an internal message that queries the terminal for its14// version using XTVERSION.15type terminalVersion struct{}1617// RequestTerminalVersion is a command that queries the terminal for its18// version using XTVERSION. Note that some terminals may not support thisfix: skip capability queries when input is disabled (#1801)draw me an elephantbefore adoption8b10e22
lines 19–20why, one step back19// command. Use [WithInput] to enable input, since the reply cannot be read20// otherwise.Merge pull request #1118 from charmbracelet/v2-expAyman Bagabasbefore adoptiond1c8c97
lines 21–23why, one step back21func RequestTerminalVersion() Msg {22 return terminalVersion{}23}