diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index ed058f89..04e39e5e 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -6029,7 +6029,7 @@ fn shell(cx: &mut compositor::Context, cmd: &str, behavior: &ShellBehavior) { let input = range.slice(text); match shell_impl(shell, cmd, pipe.then(|| input.into())) { Ok(mut output) => { - if !input.ends_with("\n") && !output.is_empty() && output.ends_with('\n') { + if !input.ends_with("\n") && output.ends_with('\n') { output.pop(); if output.ends_with('\r') { output.pop();