Make channel notes view searchable and navigable via pane history

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-08-24 17:18:18 -07:00
parent 7b6c0c539c
commit a95dcfa8bc
4 changed files with 46 additions and 13 deletions

View file

@ -391,7 +391,7 @@ mod test {
the lazy dog"
})
.await;
let cursor = cx.update_editor(|editor, _| editor.pixel_position_of_cursor());
let cursor = cx.update_editor(|editor, cx| editor.pixel_position_of_cursor(cx));
// entering visual mode should select the character
// under cursor
@ -400,7 +400,7 @@ mod test {
fox jumps over
the lazy dog"})
.await;
cx.update_editor(|editor, _| assert_eq!(cursor, editor.pixel_position_of_cursor()));
cx.update_editor(|editor, cx| assert_eq!(cursor, editor.pixel_position_of_cursor(cx)));
// forwards motions should extend the selection
cx.simulate_shared_keystrokes(["w", "j"]).await;
@ -430,7 +430,7 @@ mod test {
b
"})
.await;
let cursor = cx.update_editor(|editor, _| editor.pixel_position_of_cursor());
let cursor = cx.update_editor(|editor, cx| editor.pixel_position_of_cursor(cx));
cx.simulate_shared_keystrokes(["v"]).await;
cx.assert_shared_state(indoc! {"
a
@ -438,7 +438,7 @@ mod test {
ˇ»b
"})
.await;
cx.update_editor(|editor, _| assert_eq!(cursor, editor.pixel_position_of_cursor()));
cx.update_editor(|editor, cx| assert_eq!(cursor, editor.pixel_position_of_cursor(cx)));
// toggles off again
cx.simulate_shared_keystrokes(["v"]).await;
@ -510,7 +510,7 @@ mod test {
b
ˇ"})
.await;
let cursor = cx.update_editor(|editor, _| editor.pixel_position_of_cursor());
let cursor = cx.update_editor(|editor, cx| editor.pixel_position_of_cursor(cx));
cx.simulate_shared_keystrokes(["shift-v"]).await;
cx.assert_shared_state(indoc! {"
a
@ -518,7 +518,7 @@ mod test {
ˇ"})
.await;
assert_eq!(cx.mode(), cx.neovim_mode().await);
cx.update_editor(|editor, _| assert_eq!(cursor, editor.pixel_position_of_cursor()));
cx.update_editor(|editor, cx| assert_eq!(cursor, editor.pixel_position_of_cursor(cx)));
cx.simulate_shared_keystrokes(["x"]).await;
cx.assert_shared_state(indoc! {"
a