Rename the OpenFile action to OpenSelectedFilename to better reflect its function (#22494)

Release Notes:

- Renamed the `OpenFile` action to `OpenSelectedFilename` for clarity
This commit is contained in:
Cole Miller
2025-01-07 04:18:04 +00:00
committed by GitHub
parent 2ba91609c9
commit 810b37c129
9 changed files with 113 additions and 33 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
//! This module contains all actions supported by [`Editor`].
use super::*;
use gpui::action_as;
use gpui::{action_aliases, action_as};
use util::serde::default_true;
#[derive(PartialEq, Clone, Deserialize, Default)]
@@ -311,7 +311,6 @@ gpui::actions!(
OpenExcerpts,
OpenExcerptsSplit,
OpenProposedChangesEditor,
OpenFile,
OpenDocs,
OpenPermalinkToLine,
OpenUrl,
@@ -389,3 +388,5 @@ gpui::actions!(
);
action_as!(go_to_line, ToggleGoToLine as Toggle);
action_aliases!(editor, OpenSelectedFilename, [OpenFile]);
+1 -1
View File
@@ -9503,7 +9503,7 @@ impl Editor {
url_finder.detach();
}
pub fn open_file(&mut self, _: &OpenFile, cx: &mut ViewContext<Self>) {
pub fn open_selected_filename(&mut self, _: &OpenSelectedFilename, cx: &mut ViewContext<Self>) {
let Some(workspace) = self.workspace() else {
return;
};
+1 -1
View File
@@ -342,7 +342,7 @@ impl EditorElement {
.detach_and_log_err(cx);
});
register_action(view, cx, Editor::open_url);
register_action(view, cx, Editor::open_file);
register_action(view, cx, Editor::open_selected_filename);
register_action(view, cx, Editor::fold);
register_action(view, cx, Editor::fold_at_level);
register_action(view, cx, Editor::fold_all);