minor: Remove redundant condition in shell pipe trimming
`output.ends_with('\n')` implies `!output.is_empty()` Connects #11183
This commit is contained in:
parent
ac4c017165
commit
4f63a46e14
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue