on master help sign in
Fix highlighting in picker with multiple columns (#6333)
7704965exp80
helix-term/src/ui/picker.rs+4−1
@@ -812,7 +812,10 @@ impl<T: Item + 'static> Component for Picker<T> {
812 for cell in row.cells.iter_mut() {
812 for cell in row.cells.iter_mut() {
813 let spans = match cell.content.lines.get(0) {
813 let spans = match cell.content.lines.get(0) {
814 Some(s) => s,
814 Some(s) => s,
815+ None => {
816+ cell_start_byte_offset += TEMP_CELL_SEP.len();
815− None => continue,
817+ continue;
818+ }
816 };
819 };
817
820
818 let mut cell_len = 0;
821 let mut cell_len = 0;
helix-tui/src/text.rs+3−1
@@ -453,10 +453,12 @@ impl<'a> From<&Text<'a>> for String {
453 let mut output = String::with_capacity(size);
453 let mut output = String::with_capacity(size);
454
454
455 for spans in &text.lines {
455 for spans in &text.lines {
456+ if !output.is_empty() {
457+ output.push('\n');
458+ }
456 for span in &spans.0 {
459 for span in &spans.0 {
457 output.push_str(&span.content);
460 output.push_str(&span.content);
458 }
461 }
459− output.push('\n');
460 }
462 }
461 output
463 output
462 }
464 }