aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-08-13 03:46:52 +0300
committerGitHub <noreply@github.com>2026-08-13 03:46:52 +0300
commit952729ee03e0939d7a9d893f87f24179cf0eb7cb (patch)
tree54c518f3fc3517e8c3611c92583e7e764625e1db /src/app
parenta4d52ab60282b2ad021cb90978a7ed4d3898704b (diff)
fix: preserve logical lines in scrollback editor (#2735)
refs #2733 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: Can Celik <ogulcancelik@gmail.com>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/input/navigate.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/app/input/navigate.rs b/src/app/input/navigate.rs
index beb2f363..afe9e6e0 100644
--- a/src/app/input/navigate.rs
+++ b/src/app/input/navigate.rs
@@ -975,7 +975,8 @@ impl App {
.state
.runtime_for_pane_in_workspace(&self.terminal_runtimes, ws_idx, pane_id)
.ok_or_else(|| std::io::Error::other("focused pane has no scrollback runtime"))?
- .recent_text(usize::MAX);
+ .recent_unwrapped_text_snapshot(usize::MAX)
+ .text;
let path = write_scrollback_temp_file(&scrollback)?;
@@ -3661,7 +3662,7 @@ navigate_pane_down = "ctrl+j"
#[cfg(unix)]
#[tokio::test]
- async fn edit_scrollback_key_opens_focused_runtime_scrollback_in_editor_pane() {
+ async fn edit_scrollback_key_preserves_logical_lines_in_editor_pane() {
let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel();
let mut app = App::new(
&Config::default(),
@@ -3675,10 +3676,10 @@ navigate_pane_down = "ctrl+j"
workspace.tabs[0].runtimes.insert(
root_pane,
crate::terminal::TerminalRuntime::test_with_scrollback_bytes(
- 20,
+ 5,
5,
4096,
- b"alpha\nbeta\n",
+ b"ABCDEFGHIJ\r\nKLMNO",
),
);
app.state.workspaces = vec![workspace];
@@ -3708,8 +3709,7 @@ navigate_pane_down = "ctrl+j"
}
let content = wait_for_file(&output_path);
- assert!(content.contains("alpha"));
- assert!(content.contains("beta"));
+ assert_eq!(content, "ABCDEFGHIJ\nKLMNO");
assert_eq!(app.state.mode, Mode::Terminal);
assert!(
app.state.terminals.values().any(|terminal| terminal