Skip to content

Commit

Permalink
fix(commands): no last picker error (helix-editor#4387)
Browse files Browse the repository at this point in the history
  • Loading branch information
matoous authored and Shekhinah Memmel committed Dec 11, 2022
1 parent e33a99b commit 35dbc42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2518,12 +2518,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")
}));
}

Expand Down

0 comments on commit 35dbc42

Please sign in to comment.