mirror of https://github.com/helix-editor/helix
minor: Remove redundant condition in shell pipe trimming
`output.ends_with('\n')` implies `!output.is_empty()` Connects #11183pull/12328/head
parent
ac4c017165
commit
4f63a46e14
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue