mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-12 17:07:13 +08:00
Add some logging for XTGETTCAP
This commit is contained in:
parent
14df28382d
commit
cc9083e220
|
@ -1277,11 +1277,20 @@ pub trait InputEventQueuer {
|
|||
}
|
||||
buffer.pop();
|
||||
buffer.pop();
|
||||
// \e P 1 r + Pn ST
|
||||
// \e P 0 r + msg ST
|
||||
let buffer = &buffer[5..];
|
||||
if !success {
|
||||
FLOG!(
|
||||
reader,
|
||||
format!(
|
||||
"Received XTGETTCAP failure response: {}",
|
||||
str2wcstring(&parse_hex(buffer)?),
|
||||
)
|
||||
);
|
||||
return None;
|
||||
}
|
||||
// \e P 1 r + Pn ST
|
||||
let mut buffer = buffer[5..].splitn(2, |&c| c == b'=');
|
||||
let mut buffer = buffer.splitn(2, |&c| c == b'=');
|
||||
let key = buffer.next().unwrap();
|
||||
let value = buffer.next()?;
|
||||
let key = parse_hex(key)?;
|
||||
|
|
|
@ -2429,6 +2429,14 @@ impl<'a> Reader<'a> {
|
|||
}
|
||||
|
||||
fn xtgettcap(out: &mut impl Write, cap: &str) {
|
||||
FLOG!(
|
||||
reader,
|
||||
format!(
|
||||
"Sending XTGETTCAP request for {}: {:?}",
|
||||
cap,
|
||||
format!("\x1bP+q{}\x1b\\", DisplayAsHex(cap))
|
||||
)
|
||||
);
|
||||
let _ = write!(out, "\x1bP+q{}\x1b\\", DisplayAsHex(cap));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user