Rename context parameters to cx in main.rs

This commit is contained in:
Max Brunsfeld 2021-05-28 15:10:39 -07:00
parent 5fe3081e7c
commit f6e2754494
2 changed files with 9 additions and 9 deletions

View file

@ -24,19 +24,19 @@ fn main() {
settings, settings,
}; };
app.run(move |ctx| { app.run(move |cx| {
ctx.set_menus(menus::menus(app_state.settings.clone())); cx.set_menus(menus::menus(app_state.settings.clone()));
workspace::init(ctx); workspace::init(cx);
editor::init(ctx); editor::init(cx);
file_finder::init(ctx); file_finder::init(cx);
if stdout_is_a_pty() { if stdout_is_a_pty() {
ctx.platform().activate(true); cx.platform().activate(true);
} }
let paths = collect_path_args(); let paths = collect_path_args();
if !paths.is_empty() { if !paths.is_empty() {
ctx.dispatch_global_action( cx.dispatch_global_action(
"workspace:open_paths", "workspace:open_paths",
OpenParams { OpenParams {
paths, paths,

View file

@ -144,8 +144,8 @@ fn write_tree(path: &Path, tree: serde_json::Value) {
} }
} }
pub fn build_app_state(ctx: &AppContext) -> AppState { pub fn build_app_state(cx: &AppContext) -> AppState {
let settings = settings::channel(&ctx.font_cache()).unwrap().1; let settings = settings::channel(&cx.font_cache()).unwrap().1;
let language_registry = Arc::new(LanguageRegistry::new()); let language_registry = Arc::new(LanguageRegistry::new());
AppState { AppState {
settings, settings,