mirror of
https://github.com/microsoft/edit.git
synced 2025-07-07 21:35:16 +00:00
Experiment with a 100ms timeout on ESC (#416)
Related: #243 See: https://github.com/PowerShell/Win32-OpenSSH/issues/2275
This commit is contained in:
parent
7e28e7291a
commit
03a4e399f2
1 changed files with 6 additions and 4 deletions
10
src/vt.rs
10
src/vt.rs
|
@ -86,10 +86,12 @@ impl Parser {
|
|||
/// is just the result of the user literally pressing the Escape key.
|
||||
pub fn read_timeout(&mut self) -> std::time::Duration {
|
||||
match self.state {
|
||||
// 100ms is a upper ceiling for a responsive feel. This uses half that,
|
||||
// under the assumption that a really slow terminal needs equal amounts
|
||||
// of time for I and O. Realistically though, this could be much lower.
|
||||
State::Esc => time::Duration::from_millis(50),
|
||||
// 100ms is a upper ceiling for a responsive feel.
|
||||
// Realistically though, this could be much lower.
|
||||
//
|
||||
// However, there seems to be issues with OpenSSH on Windows.
|
||||
// See: https://github.com/PowerShell/Win32-OpenSSH/issues/2275
|
||||
State::Esc => time::Duration::from_millis(100),
|
||||
_ => time::Duration::MAX,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue