on master help sign in
fix(commands): no last picker error (#4387)
eee8362Matouš Dzivjak
helix-term/src/commands.rs+3−3
@@ -2478,12 +2478,12 @@ pub fn command_palette(cx: &mut Context) {
2478
2478
2479fn last_picker(cx: &mut Context) {
2479fn last_picker(cx: &mut Context) {
2480 // TODO: last picker does not seem to work well with buffer_picker
2480 // TODO: last picker does not seem to work well with buffer_picker
2481− cx.callback = Some(Box::new(|compositor: &mut Compositor, _| {
2481+ cx.callback = Some(Box::new(|compositor, cx| {
2482 if let Some(picker) = compositor.last_picker.take() {
2482 if let Some(picker) = compositor.last_picker.take() {
2483 compositor.push(picker);
2483 compositor.push(picker);
2484+ } else {
2485+ cx.editor.set_error("no last picker")
2484 }
2486 }
2485− // XXX: figure out how to show error when no last picker lifetime
2486− // cx.editor.set_error("no last picker")
2487 }));
2487 }));
2488}
2488}
2489
2489