mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: Xterm Send Device Attributes (Primary DA) (#607)
This commit is contained in:
@@ -360,8 +360,9 @@ class ControlSequenceIntroducerProcessor(terminal: Terminal, reader: TerminalRea
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Send Device Attributes (Primary DA).
|
||||
// Send Device Attributes (Primary DA).
|
||||
'c' -> {
|
||||
sendDeviceAttributes()
|
||||
}
|
||||
|
||||
// CSI Ps M Delete Ps Line(s) (default = 1) (DL).
|
||||
@@ -505,6 +506,22 @@ class ControlSequenceIntroducerProcessor(terminal: Terminal, reader: TerminalRea
|
||||
|
||||
}
|
||||
|
||||
private fun sendDeviceAttributes() {
|
||||
|
||||
assertEventDispatchThread()
|
||||
|
||||
if (!terminalModel.hasData(DataKey.TerminalWriter)) {
|
||||
return
|
||||
}
|
||||
|
||||
val writer = terminalModel.getData(DataKey.TerminalWriter)
|
||||
|
||||
// VT102_RESPONSE
|
||||
val bytes = "${ControlCharacters.ESC}[?6c".toByteArray(writer.getCharset())
|
||||
writer.write(TerminalWriter.WriteRequest.fromBytes(bytes))
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-?-Pm-h.1D0E
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user