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
|
@ -8,9 +8,11 @@ use std::{
|
|||
|
||||
use call::ActiveCall;
|
||||
use editor::{
|
||||
actions::{
|
||||
ConfirmCodeAction, ConfirmCompletion, ConfirmRename, Redo, Rename, ToggleCodeActions, Undo,
|
||||
},
|
||||
test::editor_test_context::{AssertionContextManager, EditorTestContext},
|
||||
ConfirmCodeAction, ConfirmCompletion, ConfirmRename, Editor, Redo, Rename, ToggleCodeActions,
|
||||
Undo,
|
||||
Editor,
|
||||
};
|
||||
use futures::StreamExt;
|
||||
use gpui::{TestAppContext, VisualContext, VisualTestContext};
|
||||
|
@ -217,7 +219,8 @@ async fn test_newline_above_or_below_does_not_move_guest_cursor(
|
|||
editor_cx_b.set_selections_state(indoc! {"
|
||||
Some textˇ
|
||||
"});
|
||||
editor_cx_a.update_editor(|editor, cx| editor.newline_above(&editor::NewlineAbove, cx));
|
||||
editor_cx_a
|
||||
.update_editor(|editor, cx| editor.newline_above(&editor::actions::NewlineAbove, cx));
|
||||
executor.run_until_parked();
|
||||
editor_cx_a.assert_editor_state(indoc! {"
|
||||
ˇ
|
||||
|
@ -237,7 +240,8 @@ async fn test_newline_above_or_below_does_not_move_guest_cursor(
|
|||
|
||||
Some textˇ
|
||||
"});
|
||||
editor_cx_a.update_editor(|editor, cx| editor.newline_below(&editor::NewlineBelow, cx));
|
||||
editor_cx_a
|
||||
.update_editor(|editor, cx| editor.newline_below(&editor::actions::NewlineBelow, cx));
|
||||
executor.run_until_parked();
|
||||
editor_cx_a.assert_editor_state(indoc! {"
|
||||
|
||||
|
|
|
@ -1229,7 +1229,9 @@ async fn test_auto_unfollowing(cx_a: &mut TestAppContext, cx_b: &mut TestAppCont
|
|||
});
|
||||
|
||||
// When client B moves, it automatically stops following client A.
|
||||
editor_b2.update(cx_b, |editor, cx| editor.move_right(&editor::MoveRight, cx));
|
||||
editor_b2.update(cx_b, |editor, cx| {
|
||||
editor.move_right(&editor::actions::MoveRight, cx)
|
||||
});
|
||||
assert_eq!(
|
||||
workspace_b.update(cx_b, |workspace, _| workspace.leader_for_pane(&pane_b)),
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue