Use UpdateGlobal accessors in more places (#11925)
This PR updates a number of instances that were previously using `cx.update_global` to use `UpdateGlobal::update_global` instead. Release Notes: - N/A
This commit is contained in:
parent
c1e291bc96
commit
13bbaf1e18
20 changed files with 66 additions and 68 deletions
|
|
@ -27,7 +27,7 @@ use editor::{
|
|||
};
|
||||
use gpui::{
|
||||
actions, impl_actions, Action, AppContext, EntityId, FocusableView, Global, KeystrokeEvent,
|
||||
Subscription, View, ViewContext, WeakView, WindowContext,
|
||||
Subscription, UpdateGlobal, View, ViewContext, WeakView, WindowContext,
|
||||
};
|
||||
use language::{CursorShape, Point, SelectionGoal, TransactionId};
|
||||
pub use mode_indicator::ModeIndicator;
|
||||
|
|
@ -106,11 +106,11 @@ pub fn init(cx: &mut AppContext) {
|
|||
CommandPaletteFilter::update_global(cx, |filter, _| {
|
||||
filter.hide_namespace(Vim::NAMESPACE);
|
||||
});
|
||||
cx.update_global(|vim: &mut Vim, cx: &mut AppContext| {
|
||||
Vim::update_global(cx, |vim, cx| {
|
||||
vim.set_enabled(VimModeSetting::get_global(cx).0, cx)
|
||||
});
|
||||
cx.observe_global::<SettingsStore>(|cx| {
|
||||
cx.update_global(|vim: &mut Vim, cx: &mut AppContext| {
|
||||
Vim::update_global(cx, |vim, cx| {
|
||||
vim.set_enabled(VimModeSetting::get_global(cx).0, cx)
|
||||
});
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue