aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorMatouš Dzivjak2022-10-20 20:50:54 +0000
committerGitHub2022-10-20 20:50:54 +0000
commiteee83620158bd710272c69194ac2ae2b51fdc708 (patch)
tree9bed9ae13897dad65221d19face435aa019e49ad /helix-term
parentd801a6693c3d475b3942f705d3ef48d7966bdf65 (diff)
fix(commands): no last picker error (#4387)
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 87bbd6c6..db10d851 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2478,12 +2478,12 @@ pub fn command_palette(cx: &mut Context) {
fn last_picker(cx: &mut Context) {
// TODO: last picker does not seem to work well with buffer_picker
- cx.callback = Some(Box::new(|compositor: &mut Compositor, _| {
+ cx.callback = Some(Box::new(|compositor, cx| {
if let Some(picker) = compositor.last_picker.take() {
compositor.push(picker);
+ } else {
+ cx.editor.set_error("no last picker")
}
- // XXX: figure out how to show error when no last picker lifetime
- // cx.editor.set_error("no last picker")
}));
}