@@ -1365,17 +1365,17 @@ mod cmd {
1365 .set_status(cx.editor.clipboard_provider.name().into());
1365 .set_status(cx.editor.clipboard_provider.name().into());
1368− fn change_current_directory(editor: &mut Editor, args: &[&str], _: PromptEvent) {
1368+ fn change_current_directory(cx: &mut compositor::Context, args: &[&str], _: PromptEvent) {
1369 let dir = match args.first() {
1369 let dir = match args.first() {
1370 Some(dir) => dir,
1370 Some(dir) => dir,
1371 None => {
1371 None => {
1372− editor.set_error("target directory not provided".into());
1372+ cx.editor.set_error("target directory not provided".into());
1377 if let Err(e) = std::env::set_current_dir(dir) {
1377 if let Err(e) = std::env::set_current_dir(dir) {
1378− editor.set_error(format!(
1378+ cx.editor.set_error(format!(
1379 "Couldn't change the current working directory: {:?}",
1379 "Couldn't change the current working directory: {:?}",
@@ -1383,20 +1383,24 @@ mod cmd {
1385 match std::env::current_dir() {
1385 match std::env::current_dir() {
1386− Ok(cwd) => editor.set_status(format!(
1386+ Ok(cwd) => cx.editor.set_status(format!(
1387 "Current working directory is now {}",
1387 "Current working directory is now {}",
1388 cwd.display()
1388 cwd.display()
1390− Err(e) => editor.set_error(format!("Couldn't get the new working directory: {}", e)),
1392+ .set_error(format!("Couldn't get the new working directory: {}", e)),
1394− fn show_current_directory(editor: &mut Editor, args: &[&str], _: PromptEvent) {
1396+ fn show_current_directory(cx: &mut compositor::Context, args: &[&str], _: PromptEvent) {
1395 match std::env::current_dir() {
1397 match std::env::current_dir() {
1396− Ok(cwd) => editor.set_status(format!("Current working directory is {}", cwd.display())),
1400+ .set_status(format!("Current working directory is {}", cwd.display())),
1397− Err(e) => {
1401+ Err(e) => cx
1398− editor.set_error(format!("Couldn't get the current working directory: {}", e))
1403+ .set_error(format!("Couldn't get the current working directory: {}", e)),