Code review changes
This commit is contained in:
+3
-15
@@ -38,24 +38,12 @@ pub fn menus() -> Vec<Menu<'static>> {
|
||||
MenuItem::action("Open Recent...", recent_projects::OpenRecent),
|
||||
MenuItem::separator(),
|
||||
MenuItem::action("Add Folder to Project…", workspace::AddFolderToProject),
|
||||
MenuItem::action(
|
||||
"Save",
|
||||
workspace::Save {
|
||||
save_behavior: None,
|
||||
},
|
||||
),
|
||||
MenuItem::action("Save", workspace::Save { save_intent: None }),
|
||||
MenuItem::action("Save As…", workspace::SaveAs),
|
||||
MenuItem::action(
|
||||
"Save All",
|
||||
workspace::SaveAll {
|
||||
save_behavior: None,
|
||||
},
|
||||
),
|
||||
MenuItem::action("Save All", workspace::SaveAll { save_intent: None }),
|
||||
MenuItem::action(
|
||||
"Close Editor",
|
||||
workspace::CloseActiveItem {
|
||||
save_behavior: None,
|
||||
},
|
||||
workspace::CloseActiveItem { save_intent: None },
|
||||
),
|
||||
MenuItem::action("Close Window", workspace::CloseWindow),
|
||||
],
|
||||
|
||||
@@ -1318,6 +1318,7 @@ mod tests {
|
||||
let save_task = workspace.update(cx, |workspace, cx| {
|
||||
workspace.save_active_item(SaveIntent::Save, cx)
|
||||
});
|
||||
cx.foreground().run_until_parked();
|
||||
window.simulate_prompt_answer(0, cx);
|
||||
save_task.await.unwrap();
|
||||
editor.read_with(cx, |editor, cx| {
|
||||
@@ -1522,9 +1523,7 @@ mod tests {
|
||||
});
|
||||
cx.dispatch_action(
|
||||
window.into(),
|
||||
workspace::CloseActiveItem {
|
||||
save_behavior: None,
|
||||
},
|
||||
workspace::CloseActiveItem { save_intent: None },
|
||||
);
|
||||
|
||||
cx.foreground().run_until_parked();
|
||||
@@ -1535,9 +1534,7 @@ mod tests {
|
||||
|
||||
cx.dispatch_action(
|
||||
window.into(),
|
||||
workspace::CloseActiveItem {
|
||||
save_behavior: None,
|
||||
},
|
||||
workspace::CloseActiveItem { save_intent: None },
|
||||
);
|
||||
cx.foreground().run_until_parked();
|
||||
window.simulate_prompt_answer(1, cx);
|
||||
|
||||
Reference in New Issue
Block a user