mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat: increase terminal response timeout to better tolerate slow SSH network environments (#2843)
This commit is contained in:
parent
d55e002d5a
commit
b637c32ef7
1 changed files with 2 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ impl Emulator {
|
|||
let now = std::time::Instant::now();
|
||||
let h = tokio::spawn(Self::error_to_user());
|
||||
|
||||
let (buf, result) = TTY.read_until(Duration::from_millis(500), |b, buf| {
|
||||
let (buf, result) = TTY.read_until(Duration::from_millis(1000), |b, buf| {
|
||||
b == b'c'
|
||||
&& buf.contains(&0x1b)
|
||||
&& buf.rsplitn(2, |&b| b == 0x1b).next().is_some_and(|s| s.starts_with(b"[?"))
|
||||
|
|
@ -137,7 +137,7 @@ impl Emulator {
|
|||
|
||||
pub fn read_until_dsr() -> String {
|
||||
let now = std::time::Instant::now();
|
||||
let (buf, result) = TTY.read_until(Duration::from_millis(100), |b, buf| {
|
||||
let (buf, result) = TTY.read_until(Duration::from_millis(200), |b, buf| {
|
||||
b == b'n' && (buf.ends_with(b"\x1b[0n") || buf.ends_with(b"\x1b[3n"))
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue