Move editor key handling to one place

This commit is contained in:
Joscha 2022-08-06 23:38:47 +02:00
parent f48a4a6416
commit bfbdec4396
6 changed files with 120 additions and 59 deletions

View file

@ -107,7 +107,10 @@ impl KeyBindingsList {
pub fn binding(&mut self, binding: &str, description: &str) {
let widget = HJoin::new(vec![
Segment::new(Resize::new(Text::new((binding, Self::binding_style()))).min_width(16)),
Segment::new(
Resize::new(Padding::new(Text::new((binding, Self::binding_style()))).right(1))
.min_width(16),
),
Segment::new(Text::new(description)),
]);
self.0.add_unsel(widget);