@@ -2187,7 +2187,7 @@ async fn make_format_callback(
2187 format: impl Future<Output = helix_lsp::util::LspFormatting> + Send + 'static,
2187 format: impl Future<Output = helix_lsp::util::LspFormatting> + Send + 'static,
2188) -> anyhow::Result<job::Callback> {
2188) -> anyhow::Result<job::Callback> {
2189 let format = format.await;
2189 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| {
2191 let view_id = view!(editor).id;
2191 let view_id = view!(editor).id;
2192 if let Some(doc) = editor.document_mut(doc_id) {
2192 if let Some(doc) = editor.document_mut(doc_id) {
2193 if doc.version() == doc_version {
2193 if doc.version() == doc_version {
@@ -3475,9 +3475,7 @@ pub fn completion(cx: &mut Context) {
3476 cx.callback(
3476 cx.callback(
3478− move |editor: &mut Editor,
3479− compositor: &mut Compositor,
3480− response: Option<lsp::CompletionResponse>| {
3478+ move |editor, compositor, response: Option<lsp::CompletionResponse>| {
3481 let doc = doc!(editor);
3479 let doc = doc!(editor);
3482 if doc.mode() != Mode::Insert {
3480 if doc.mode() != Mode::Insert {
3483 // we're not in insert mode anymore
3481 // we're not in insert mode anymore
@@ -4123,11 +4121,12 @@ fn shell_append_output(cx: &mut Context) {
4125fn shell_keep_pipe(cx: &mut Context) {
4123fn shell_keep_pipe(cx: &mut Context) {
4126− let prompt = Prompt::new(
4124+ ui::prompt(
4127 "keep-pipe:".into(),
4126 "keep-pipe:".into(),
4128 Some('|'),
4127 Some('|'),
4129 ui::completers::none,
4128 ui::completers::none,
4130− move |cx: &mut compositor::Context, input: &str, event: PromptEvent| {
4129+ move |cx, input: &str, event: PromptEvent| {
4131 let shell = &cx.editor.config().shell;
4130 let shell = &cx.editor.config().shell;
4132 if event != PromptEvent::Validate {
4131 if event != PromptEvent::Validate {
@@ -4171,8 +4170,6 @@ fn shell_keep_pipe(cx: &mut Context) {
4171 doc.set_selection(view.id, Selection::new(ranges, index));
4170 doc.set_selection(view.id, Selection::new(ranges, index));
4175− cx.push_layer(Box::new(prompt));
4178fn shell_impl(
4175fn shell_impl(
@@ -4219,11 +4216,13 @@ fn shell(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
4219 ShellBehavior::Replace | ShellBehavior::Ignore => true,
4216 ShellBehavior::Replace | ShellBehavior::Ignore => true,
4220 ShellBehavior::Insert | ShellBehavior::Append => false,
4217 ShellBehavior::Insert | ShellBehavior::Append => false,
4222− let prompt = Prompt::new(
4220+ ui::prompt(
4224 Some('|'),
4223 Some('|'),
4225 ui::completers::none,
4224 ui::completers::none,
4226− move |cx: &mut compositor::Context, input: &str, event: PromptEvent| {
4225+ move |cx, input: &str, event: PromptEvent| {
4227 let config = cx.editor.config();
4226 let config = cx.editor.config();
4228 let shell = &config.shell;
4227 let shell = &config.shell;
4229 if event != PromptEvent::Validate {
4228 if event != PromptEvent::Validate {
@@ -4273,8 +4272,6 @@ fn shell(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
4273 view.ensure_cursor_in_view(doc, config.scrolloff);
4272 view.ensure_cursor_in_view(doc, config.scrolloff);
4277− cx.push_layer(Box::new(prompt));
4280fn suspend(_cx: &mut Context) {
4277fn suspend(_cx: &mut Context) {
@@ -4420,13 +4417,11 @@ fn replay_macro(cx: &mut Context) {
4422 let count = cx.count();
4419 let count = cx.count();
4423− cx.callback = Some(Box::new(
4420+ cx.callback = Some(Box::new(move |compositor, cx| {
4424− move |compositor: &mut Compositor, cx: &mut compositor::Context| {
4425− for _ in 0..count {
4421+ for _ in 0..count {
4426− for &key in keys.iter() {
4422+ for &key in keys.iter() {
4427− compositor.handle_event(crossterm::event::Event::Key(key.into()), cx);
4423+ compositor.handle_event(crossterm::event::Event::Key(key.into()), cx);