Refresh scrollbar auto-hide setting when opening a new editor
This commit is contained in:
parent
d93e75bf5f
commit
f4306d977f
1 changed files with 5 additions and 4 deletions
|
@ -330,10 +330,6 @@ pub fn init(cx: &mut MutableAppContext) {
|
|||
cx.add_async_action(Editor::confirm_rename);
|
||||
cx.add_async_action(Editor::find_all_references);
|
||||
|
||||
cx.set_global(ScrollbarAutoHide(
|
||||
cx.platform().should_auto_hide_scrollbars(),
|
||||
));
|
||||
|
||||
hover_popover::init(cx);
|
||||
link_go_to_definition::init(cx);
|
||||
mouse_context_menu::init(cx);
|
||||
|
@ -1076,6 +1072,11 @@ impl Editor {
|
|||
let editor_created_event = EditorCreated(cx.handle());
|
||||
cx.emit_global(editor_created_event);
|
||||
|
||||
if mode == EditorMode::Full {
|
||||
let should_auto_hide_scrollbars = cx.platform().should_auto_hide_scrollbars();
|
||||
cx.set_global(ScrollbarAutoHide(should_auto_hide_scrollbars));
|
||||
}
|
||||
|
||||
this.report_event("open editor", cx);
|
||||
this
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue