fix(agor-pty): implement real PTY resize (TIOCSWINSZ via portable-pty)
Was only updating cached dimensions without calling PTY resize. Shell thought terminal was wrong size → double prompts, escape code leaks. - Session stores master PTY handle (Arc<Mutex<Box<dyn MasterPty>>>) - resize() calls master.resize(PtySize) → issues TIOCSWINSZ - Reader task no longer owns master handle (uses cloned reader only)
This commit is contained in:
parent
0f7024ec8f
commit
621e1c5c8c
2 changed files with 18 additions and 18 deletions
|
|
@ -314,7 +314,9 @@ async fn handle_message(
|
|||
let mut st = state.lock().await;
|
||||
match st.sessions.get_mut(&session_id) {
|
||||
Some(sess) => {
|
||||
sess.note_resize(cols, rows);
|
||||
if let Err(e) = sess.resize(cols, rows).await {
|
||||
log::warn!("resize {session_id}: {e}");
|
||||
}
|
||||
}
|
||||
None => {
|
||||
let _ = out_tx.try_send(DaemonMessage::Error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue