on master help sign in
Highlight whole row in picker menus (#2939)
9f43dbcChrHorn
helix-term/src/ui/picker.rs+10−1
@@ -607,7 +607,16 @@ impl<T: Item + 'static> Component for Picker<T> {
607 for (i, (_index, option)) in files.take(rows as usize).enumerate() {
607 for (i, (_index, option)) in files.take(rows as usize).enumerate() {
608 let is_active = i == (self.cursor - offset);
608 let is_active = i == (self.cursor - offset);
609 if is_active {
609 if is_active {
610+ surface.set_string(
610− surface.set_string(inner.x.saturating_sub(2), inner.y + i as u16, ">", selected);
611+ inner.x.saturating_sub(3),
612+ inner.y + i as u16,
613+ " > ",
614+ selected,
615+ );
616+ surface.set_style(
617+ Rect::new(inner.x, inner.y + i as u16, inner.width, 1),
618+ selected,
619+ );
611 }
620 }
612
621
613 let spans = option.label(&self.editor_data);
622 let spans = option.label(&self.editor_data);