on master help sign in
Highlight whole row in picker menus (#2939)
commit9f43dbc45d254ff860f7d33db201b2f0a6073195 authorChrHorn <christoph-horn@hotmail.de> dateSat 2 Jul 2022, 13:59 (4 years ago) parent6e2aaed
1 file changed+10−1
helix-term/src/ui/picker.rs+10−1
helix-term/src/ui/picker.rs+10−1
@@ -607,7 +607,16 @@ impl<T: Item + 'static> Component for Picker<T> {
607607 for (i, (_index, option)) in files.take(rows as usize).enumerate() {
608608 let is_active = i == (self.cursor - offset);
609609 if is_active {
610− surface.set_string(inner.x.saturating_sub(2), inner.y + i as u16, ">", selected);
610+ surface.set_string(
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+ );
611620 }
612621
613622 let spans = option.label(&self.editor_data);