diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-09-06 16:27:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-06 16:27:52 +0200 |
| commit | 9d111db9c83823eb4ce8623d9707e28153b01334 (patch) | |
| tree | 58ff584b1fc79e23dc00f093860908c9bad4f2b7 /src/app | |
| parent | 5a64e8da4551990367dd26d77cf3b654dfa27a73 (diff) | |
fix: keep manual selections active during terminal output (#3684)
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/api/panes.rs | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/app/api/panes.rs b/src/app/api/panes.rs index f1c3a667..9b9a28cc 100644 --- a/src/app/api/panes.rs +++ b/src/app/api/panes.rs @@ -2419,15 +2419,25 @@ mod tests { ), ); - let response = app.handle_pane_selection_read( - "req".into(), - PaneSelectionReadParams { - pane_id: public_pane_id.clone(), - anchor: crate::api::schema::PaneTextPoint { row: 0, col: 0 }, - cursor: crate::api::schema::PaneTextPoint { row: 0, col: 4 }, - content_revision: None, - }, + let runtime = app + .state + .runtime_for_pane_in_workspace(&app.terminal_runtimes, 0, pane_id) + .unwrap(); + let revision = runtime.content_seq(); + runtime.test_process_pty_bytes(b"\r\nagent is still working"); + assert_ne!(runtime.content_seq(), revision); + let mut params = PaneSelectionReadParams { + pane_id: public_pane_id.clone(), + anchor: crate::api::schema::PaneTextPoint { row: 0, col: 0 }, + cursor: crate::api::schema::PaneTextPoint { row: 0, col: 4 }, + content_revision: Some(revision), + }; + assert_eq!( + app.pane_selection_text(¶ms).unwrap_err().0, + "stale_content" ); + params.content_revision = None; + let response = app.handle_pane_selection_read("req".into(), params); let success: SuccessResponse = serde_json::from_str(&response).unwrap(); assert_eq!( |
