fix(menu): keep New first in the File menu, with Untitled File inside it (#3467)

#3427 put New Untitled File above the New submenu, which broke the menu test
that the File menu starts with New (as in IntelliJ IDEA). It now sits in New
next to Scratch File, labelled Untitled File.
This commit is contained in:
l0ng-ai
2026-11-15 08:45:04 +08:00
committed by GitHub
parent deec6d05a0
commit 3ef7fee3e2
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -217,7 +217,6 @@ pub fn spec(os: Os) -> Vec<Entry> {
}
let mut file = vec![
act("file.newUntitled", "New Untitled File"),
sub(
"new",
"New",
@@ -227,6 +226,7 @@ pub fn spec(os: Os) -> Vec<Entry> {
SEP,
act("file.new", "File…"),
act("file.newScratchFile", "Scratch File"),
act("file.newUntitled", "Untitled File"),
],
),
act("file.openProject", "Open…"),
@@ -1999,7 +1999,7 @@ mod tests {
};
assert_eq!(
action_ids(new),
["file.newProject", "workspace.create", "file.new", "file.newScratchFile"],
["file.newProject", "workspace.create", "file.new", "file.newScratchFile", "file.newUntitled"],
"{os:?}"
);
}
+1 -1
View File
@@ -203,7 +203,7 @@
"menu.workspace.create": "Workspace…",
"menu.workspace.open": "Open Workspace…",
"menu.workspace.manage": "Manage Workspace…",
"menu.file.newUntitled": "New Untitled File",
"menu.file.newUntitled": "Untitled File",
"menu.file.openInNewWindow": "Open in New Window…",
"menu.file.openFile": "Open File…",
"menu.remote.connect": "Remote Development…",
+1 -1
View File
@@ -203,7 +203,7 @@
"menu.workspace.create": "工作区…",
"menu.workspace.open": "打开工作区…",
"menu.workspace.manage": "管理工作区…",
"menu.file.newUntitled": "新建无标题文件",
"menu.file.newUntitled": "无标题文件",
"menu.file.openInNewWindow": "在新窗口中打开…",
"menu.file.openFile": "打开文件…",
"menu.remote.connect": "远程开发…",