Editor docs (#4097)
Release Notes: - N/A --------- Co-authored-by: Kirill <kirill@zed.dev>
This commit is contained in:
parent
647b08b101
commit
6cbc49e5f0
49 changed files with 507 additions and 376 deletions
|
@ -7,7 +7,7 @@ use crate::{
|
|||
ToggleCaseSensitive, ToggleReplace, ToggleWholeWord,
|
||||
};
|
||||
use collections::HashMap;
|
||||
use editor::{Editor, EditorElement, EditorStyle, Tab};
|
||||
use editor::{actions::Tab, Editor, EditorElement, EditorStyle};
|
||||
use futures::channel::oneshot;
|
||||
use gpui::{
|
||||
actions, div, impl_actions, Action, AppContext, ClickEvent, EventEmitter, FocusableView,
|
||||
|
@ -635,7 +635,7 @@ impl BufferSearchBar {
|
|||
registrar.register_handler(|this, action: &SelectAllMatches, cx| {
|
||||
this.select_all_matches(action, cx);
|
||||
});
|
||||
registrar.register_handler(|this, _: &editor::Cancel, cx| {
|
||||
registrar.register_handler(|this, _: &editor::actions::Cancel, cx| {
|
||||
this.dismiss(&Dismiss, cx);
|
||||
});
|
||||
registrar.register_handler_for_dismissed_search(|this, deploy, cx| {
|
||||
|
|
|
@ -7,8 +7,8 @@ use crate::{
|
|||
use anyhow::{Context as _, Result};
|
||||
use collections::HashMap;
|
||||
use editor::{
|
||||
items::active_match_index, scroll::autoscroll::Autoscroll, Anchor, Editor, EditorEvent,
|
||||
MultiBuffer, SelectAll, MAX_TAB_TITLE_LEN,
|
||||
actions::SelectAll, items::active_match_index, scroll::Autoscroll, Anchor, Editor, EditorEvent,
|
||||
MultiBuffer, MAX_TAB_TITLE_LEN,
|
||||
};
|
||||
use editor::{EditorElement, EditorStyle};
|
||||
use gpui::{
|
||||
|
@ -1383,11 +1383,11 @@ impl ProjectSearchBar {
|
|||
}
|
||||
}
|
||||
|
||||
fn tab(&mut self, _: &editor::Tab, cx: &mut ViewContext<Self>) {
|
||||
fn tab(&mut self, _: &editor::actions::Tab, cx: &mut ViewContext<Self>) {
|
||||
self.cycle_field(Direction::Next, cx);
|
||||
}
|
||||
|
||||
fn tab_previous(&mut self, _: &editor::TabPrev, cx: &mut ViewContext<Self>) {
|
||||
fn tab_previous(&mut self, _: &editor::actions::TabPrev, cx: &mut ViewContext<Self>) {
|
||||
self.cycle_field(Direction::Prev, cx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue