@@ -1458,11 +1458,11 @@ fn global_search(cx: &mut Context) {
1458 relative_path.into()
1458 relative_path.into()
1461− move |editor: &mut Editor, (line_num, path), action| {
1461+ move |cx, (line_num, path), action| {
1462− match editor.open(path.into(), action) {
1462+ match cx.editor.open(path.into(), action) {
1463 Ok(_) => {}
1463 Ok(_) => {}
1464 Err(e) => {
1464 Err(e) => {
1465− editor.set_error(format!(
1465+ cx.editor.set_error(format!(
1466 "Failed to open file '{}': {}",
1466 "Failed to open file '{}': {}",
1467 path.display(),
1467 path.display(),
@@ -1472,7 +1472,7 @@ fn global_search(cx: &mut Context) {
1474 let line_num = *line_num;
1474 let line_num = *line_num;
1475− let (view, doc) = current!(editor);
1475+ let (view, doc) = current!(cx.editor);
1476 let text = doc.text();
1476 let text = doc.text();
1477 let start = text.line_to_char(line_num);
1477 let start = text.line_to_char(line_num);
1478 let end = text.line_to_char((line_num + 1).min(text.len_lines()));
1478 let end = text.line_to_char((line_num + 1).min(text.len_lines()));
@@ -2717,8 +2717,8 @@ fn buffer_picker(cx: &mut Context) {
2717 None => "[scratch buffer]".into(),
2717 None => "[scratch buffer]".into(),
2720− |editor: &mut Editor, (id, _path): &(DocumentId, Option<PathBuf>), _action| {
2720+ |cx, (id, _path): &(DocumentId, Option<PathBuf>), _action| {
2721− editor.switch(*id, Action::Replace);
2721+ cx.editor.switch(*id, Action::Replace);
2723 |editor, (id, path)| {
2723 |editor, (id, path)| {
2724 let doc = &editor.documents.get(id)?;
2724 let doc = &editor.documents.get(id)?;
@@ -2785,9 +2785,9 @@ fn symbol_picker(cx: &mut Context) {
2785 let picker = FilePicker::new(
2785 let picker = FilePicker::new(
2786 symbols,
2786 symbols,
2787 |symbol| (&symbol.name).into(),
2787 |symbol| (&symbol.name).into(),
2788− move |editor: &mut Editor, symbol, _action| {
2788+ move |cx, symbol, _action| {
2789− push_jump(editor);
2789+ push_jump(cx.editor);
2790− let (view, doc) = current!(editor);
2790+ let (view, doc) = current!(cx.editor);
2792 if let Some(range) =
2792 if let Some(range) =
2793 lsp_range_to_range(doc.text(), symbol.location.range, offset_encoding)
2793 lsp_range_to_range(doc.text(), symbol.location.range, offset_encoding)
@@ -2845,15 +2845,15 @@ pub fn code_action(cx: &mut Context) {
2846 lsp::CodeActionOrCommand::Command(command) => command.title.as_str().into(),
2846 lsp::CodeActionOrCommand::Command(command) => command.title.as_str().into(),
2848− move |editor, code_action, _action| match code_action {
2848+ move |cx, code_action, _action| match code_action {
2849 lsp::CodeActionOrCommand::Command(command) => {
2849 lsp::CodeActionOrCommand::Command(command) => {
2850 log::debug!("code action command: {:?}", command);
2850 log::debug!("code action command: {:?}", command);
2851− editor.set_error(String::from("Handling code action command is not implemented yet, see https://github.com/helix-editor/helix/issues/183"));
2851+ cx.editor.set_error(String::from("Handling code action command is not implemented yet, see https://github.com/helix-editor/helix/issues/183"));
2853 lsp::CodeActionOrCommand::CodeAction(code_action) => {
2853 lsp::CodeActionOrCommand::CodeAction(code_action) => {
2854 log::debug!("code action: {:?}", code_action);
2854 log::debug!("code action: {:?}", code_action);
2855 if let Some(ref workspace_edit) = code_action.edit {
2855 if let Some(ref workspace_edit) = code_action.edit {
2856− apply_workspace_edit(editor, offset_encoding, workspace_edit)
2856+ apply_workspace_edit(cx.editor, offset_encoding, workspace_edit)
@@ -3267,9 +3267,7 @@ fn goto_impl(
3267 let line = location.range.start.line;
3267 let line = location.range.start.line;
3268 format!("{}:{}", file, line).into()
3268 format!("{}:{}", file, line).into()
3270− move |editor: &mut Editor, location, action| {
3271− jump_to(editor, location, offset_encoding, action)
3270+ move |cx, location, action| jump_to(cx.editor, location, offset_encoding, action),
3273 |_editor, location| {
3271 |_editor, location| {
3274 let path = location.uri.to_file_path().unwrap();
3272 let path = location.uri.to_file_path().unwrap();
3275 let line = Some((
3273 let line = Some((