mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 13:52:55 +03:00
ssh: fix lost character after keyboard auth on windows
closes: https://github.com/wez/wezterm/issues/771
This commit is contained in:
parent
8931afba5c
commit
eaa0d2f4d3
@ -28,6 +28,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* New: bold and/or italics are now synthesized for fonts when the matching font is not actually italic or doesn't match the requested weight. [#815](https://github.com/wez/wezterm/issues/815)
|
||||
* Updated: conpty.dll to v1.9.1445.0; fixes color bar artifacts when resizing window and allows win32 console applications to use mouse events
|
||||
* Fixed: Windows: pane could linger after the process has died, closing only when a new pane/tab event occurs
|
||||
* Fixed: Windows: first character after `wezterm ssh` keyboard authention was swallowed [#771](https://github.com/wez/wezterm/issues/771)
|
||||
|
||||
### 20210502-154244-3f7122cb
|
||||
|
||||
|
@ -877,17 +877,16 @@ impl portable_pty::MasterPty for WrappedSshPty {
|
||||
|
||||
impl std::io::Write for PtyWriter {
|
||||
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
|
||||
match self.writer.write(buf) {
|
||||
Ok(len) if len > 0 => Ok(len),
|
||||
res => match self.rx.recv() {
|
||||
Ok(writer) => {
|
||||
// Check for a new writer first: on Windows, the socket
|
||||
// will let us successfully write a byte to a disconnected
|
||||
// socket and we won't discover the issue until we write
|
||||
// the next byte.
|
||||
// <https://github.com/wez/wezterm/issues/771>
|
||||
if let Ok(writer) = self.rx.try_recv() {
|
||||
self.writer = writer;
|
||||
}
|
||||
self.writer.write(buf)
|
||||
}
|
||||
_ => res,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn flush(&mut self) -> std::io::Result<()> {
|
||||
match self.writer.flush() {
|
||||
|
Loading…
Reference in New Issue
Block a user