Ignore values XTGETTCAP values for indn/cuu

I don't think we want to support terminals that implement XTGETTCAP but for
some reason don't use CSI Ps S for scroll forward; that would be a needless
complication. 
Let's make ctrl-l / scrollback-push fail hard if a terminal does this.
Confusingly kitty and foot use different response formats, but happily we
no longer care.

An upcoming commit will document that we require the CSI Ps S style.
This commit is contained in:
Johannes Altmanninger
2025-04-08 19:18:33 +02:00
parent 7d5fb623c6
commit 15379ae409

View File

@@ -1534,11 +1534,11 @@ fn parse_dcs(&mut self, buffer: &mut Vec<u8>) -> Option<KeyEvent> {
str2wcstring(&value)
)
);
if key == b"indn" && matches!(&value[..], b"\x1b[%p1%dS" | b"\\E[%p1%dS") {
if key == b"indn" {
SCROLL_FORWARD_SUPPORTED.store(true);
FLOG!(reader, "Scroll forward is supported");
}
if key == b"cuu" && matches!(&value[..], b"\x1b[%p1%dA" | b"\\E[%p1%dA") {
if key == b"cuu" {
CURSOR_UP_SUPPORTED.store(true);
FLOG!(reader, "Cursor up is supported");
}