aboutsummaryrefslogtreecommitdiff
path: root/helix-tui
diff options
context:
space:
mode:
authorexp802023-03-18 16:16:40 +0000
committerGitHub2023-03-18 16:16:40 +0000
commit770496511c67cf276f0b0a292e7a82fbd1b5f778 (patch)
tree08af197751683d3f333bab717b643f730a0abc17 /helix-tui
parentac2a7731a6d04b8b913f49531058c7e2a843efd5 (diff)
Fix highlighting in picker with multiple columns (#6333)
Diffstat (limited to 'helix-tui')
-rw-r--r--helix-tui/src/text.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs
index a3e242fe..076766dd 100644
--- a/helix-tui/src/text.rs
+++ b/helix-tui/src/text.rs
@@ -453,10 +453,12 @@ impl<'a> From<&Text<'a>> for String {
let mut output = String::with_capacity(size);
for spans in &text.lines {
+ if !output.is_empty() {
+ output.push('\n');
+ }
for span in &spans.0 {
output.push_str(&span.content);
}
- output.push('\n');
}
output
}