@@ -2187,7 +2187,7 @@ async fn make_format_callback(
21872187 format: impl Future<Output = helix_lsp::util::LspFormatting> + Send + 'static,
21882188) -> anyhow::Result<job::Callback> {
21892189 let format = format.await;
2190− let call: job::Callback = Box::new(move |editor: &mut Editor, _compositor: &mut Compositor| {
2190+ let call: job::Callback = Box::new(move |editor, _compositor| {
21912191 let view_id = view!(editor).id;
21922192 if let Some(doc) = editor.document_mut(doc_id) {
21932193 if doc.version() == doc_version {
@@ -3475,9 +3475,7 @@ pub fn completion(cx: &mut Context) {
34753475
34763476 cx.callback(
34773477 future,
3478− move |editor: &mut Editor,
3479− compositor: &mut Compositor,
3480− response: Option<lsp::CompletionResponse>| {
3478+ move |editor, compositor, response: Option<lsp::CompletionResponse>| {
34813479 let doc = doc!(editor);
34823480 if doc.mode() != Mode::Insert {
34833481 // we're not in insert mode anymore
@@ -4123,11 +4121,12 @@ fn shell_append_output(cx: &mut Context) {
41234121}
41244122
41254123fn shell_keep_pipe(cx: &mut Context) {
4126− let prompt = Prompt::new(
4124+ ui::prompt(
4125+ cx,
41274126 "keep-pipe:".into(),
41284127 Some('|'),
41294128 ui::completers::none,
4130− move |cx: &mut compositor::Context, input: &str, event: PromptEvent| {
4129+ move |cx, input: &str, event: PromptEvent| {
41314130 let shell = &cx.editor.config().shell;
41324131 if event != PromptEvent::Validate {
41334132 return;
@@ -4171,8 +4170,6 @@ fn shell_keep_pipe(cx: &mut Context) {
41714170 doc.set_selection(view.id, Selection::new(ranges, index));
41724171 },
41734172 );
4174−
4175− cx.push_layer(Box::new(prompt));
41764173}
41774174
41784175fn shell_impl(
@@ -4219,11 +4216,13 @@ fn shell(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
42194216 ShellBehavior::Replace | ShellBehavior::Ignore => true,
42204217 ShellBehavior::Insert | ShellBehavior::Append => false,
42214218 };
4222− let prompt = Prompt::new(
4219+
4220+ ui::prompt(
4221+ cx,
42234222 prompt,
42244223 Some('|'),
42254224 ui::completers::none,
4226− move |cx: &mut compositor::Context, input: &str, event: PromptEvent| {
4225+ move |cx, input: &str, event: PromptEvent| {
42274226 let config = cx.editor.config();
42284227 let shell = &config.shell;
42294228 if event != PromptEvent::Validate {
@@ -4273,8 +4272,6 @@ fn shell(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
42734272 view.ensure_cursor_in_view(doc, config.scrolloff);
42744273 },
42754274 );
4276−
4277− cx.push_layer(Box::new(prompt));
42784275}
42794276
42804277fn suspend(_cx: &mut Context) {
@@ -4420,13 +4417,11 @@ fn replay_macro(cx: &mut Context) {
44204417 };
44214418
44224419 let count = cx.count();
4423− cx.callback = Some(Box::new(
4424− move |compositor: &mut Compositor, cx: &mut compositor::Context| {
4425− for _ in 0..count {
4426− for &key in keys.iter() {
4427− compositor.handle_event(crossterm::event::Event::Key(key.into()), cx);
4428− }
4420+ cx.callback = Some(Box::new(move |compositor, cx| {
4421+ for _ in 0..count {
4422+ for &key in keys.iter() {
4423+ compositor.handle_event(crossterm::event::Event::Key(key.into()), cx);
44294424 }
4430− },
4431− ));
4425+ }
4426+ }));
44324427}