From b719e1fb46f140c633ee195ebbd5159b96aedf76 Mon Sep 17 00:00:00 2001 From: Ferran Basora Date: Wed, 8 Mar 2023 21:17:45 +0000 Subject: [PATCH] Fix issue with really long lines --- samples/test7 | 2 ++ src/swapper.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 samples/test7 diff --git a/samples/test7 b/samples/test7 new file mode 100644 index 0000000..5d61c13 --- /dev/null +++ b/samples/test7 @@ -0,0 +1,2 @@ +This is a really long path: /var/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx/log/nginx.log +This is a another really long path: /var/log/apache/log/apache/log/apache/log/apache/log/apache/log/apache/log/apache/log/apache/log/apache/log/apache/log/apache/log/apache.log diff --git a/src/swapper.rs b/src/swapper.rs index 6cf1e89..c901f48 100644 --- a/src/swapper.rs +++ b/src/swapper.rs @@ -215,7 +215,7 @@ impl<'a> Swapper<'a> { }; let pane_command = format!( - "tmux capture-pane -t {active_pane_id} -p{scroll_params} | tail -n {height} | {dir}/target/release/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}", + "tmux capture-pane -J -t {active_pane_id} -p{scroll_params} | tail -n {height} | {dir}/target/release/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}", active_pane_id = active_pane_id, scroll_params = scroll_params, height = self.active_pane_height.unwrap_or(i32::MAX),