Introducing multibuffers (#14668)
Co-Authored-By: Marshall <marshall@zed.dev> Release Notes: - Added a hint the first few times you open a multibuffer to explain what is going on. Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
53bcc3649a
commit
4852e170ff
5 changed files with 180 additions and 4 deletions
|
@ -1,12 +1,13 @@
|
|||
mod base_keymap_picker;
|
||||
mod base_keymap_setting;
|
||||
mod multibuffer_hint;
|
||||
|
||||
use client::{telemetry::Telemetry, TelemetrySettings};
|
||||
use db::kvp::KEY_VALUE_STORE;
|
||||
use gpui::{
|
||||
svg, AnyElement, AppContext, EventEmitter, FocusHandle, FocusableView, InteractiveElement,
|
||||
ParentElement, Render, Styled, Subscription, Task, View, ViewContext, VisualContext, WeakView,
|
||||
WindowContext,
|
||||
actions, svg, AnyElement, AppContext, EventEmitter, FocusHandle, FocusableView,
|
||||
InteractiveElement, ParentElement, Render, Styled, Subscription, Task, View, ViewContext,
|
||||
VisualContext, WeakView, WindowContext,
|
||||
};
|
||||
use settings::{Settings, SettingsStore};
|
||||
use std::sync::Arc;
|
||||
|
@ -19,6 +20,9 @@ use workspace::{
|
|||
};
|
||||
|
||||
pub use base_keymap_setting::BaseKeymap;
|
||||
pub use multibuffer_hint::*;
|
||||
|
||||
actions!(welcome, [ResetHints]);
|
||||
|
||||
pub const FIRST_OPEN: &str = "first_open";
|
||||
|
||||
|
@ -30,6 +34,8 @@ pub fn init(cx: &mut AppContext) {
|
|||
let welcome_page = WelcomePage::new(workspace, cx);
|
||||
workspace.add_item_to_active_pane(Box::new(welcome_page), None, cx)
|
||||
});
|
||||
workspace
|
||||
.register_action(|_workspace, _: &ResetHints, cx| MultibufferHint::set_count(0, cx));
|
||||
})
|
||||
.detach();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue