on master help sign in
fix(commands): no last picker error (#4387)
commiteee83620158bd710272c69194ac2ae2b51fdc708 authorMatouš Dzivjak <matousdzivjak@gmail.com> dateThu 20 Oct 2022, 22:50 (4 years ago) parentd801a66
1 file changed+3−3
helix-term/src/commands.rs+3−3
helix-term/src/commands.rs+3−3
@@ -2478,12 +2478,12 @@ pub fn command_palette(cx: &mut Context) {
24782478
24792479fn last_picker(cx: &mut Context) {
24802480 // 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| {
24822482 if let Some(picker) = compositor.last_picker.take() {
24832483 compositor.push(picker);
2484+ } else {
2485+ cx.editor.set_error("no last picker")
24842486 }
2485− // XXX: figure out how to show error when no last picker lifetime
2486− // cx.editor.set_error("no last picker")
24872487 }));
24882488}
24892489