1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00

term: expand scope of Primary DA response

We now claim to be vt320ish with support for selective erase and sixel
graphics.

refs: https://github.com/wez/wezterm/issues/217
This commit is contained in:
Wez Furlong 2020-06-11 08:11:42 -07:00
parent a78954375d
commit d5927c22fa
2 changed files with 6 additions and 7 deletions

View File

@ -101,12 +101,6 @@ pub mod color;
#[cfg(test)]
mod test;
/// The response we given when queries for device attributes.
/// This particular string says "we are a VT102".
/// TODO: Consider VT220 extended response which can advertise
/// certain feature sets.
pub const DEVICE_IDENT: &[u8] = b"\x1b[?6c";
pub const CSI: &str = "\x1b[";
pub const OSC: &[u8] = b"\x1b]";
pub const ST: &[u8] = b"\x1b\\";

View File

@ -1251,7 +1251,12 @@ impl TerminalState {
// TODO: see https://vt100.net/docs/vt510-rm/DECSTR.html
}
Device::RequestPrimaryDeviceAttributes => {
self.writer.write(DEVICE_IDENT).ok();
let mut ident = "\x1b[?63".to_string(); // Vt320
ident.push_str(";4"); // Sixel graphics
ident.push_str(";6"); // Selective erase
ident.push('c');
self.writer.write(ident.as_bytes()).ok();
}
Device::RequestSecondaryDeviceAttributes => {
self.writer.write(b"\x1b[>0;0;0c").ok();