Don't wrap on paragraphs (#3094)
Release Notes: - vim: `{` and `}` will no longer wrap around end of file ([#2116](https://github.com/zed-industries/community/issues/2116)).
This commit is contained in:
commit
85b76b1143
5 changed files with 52 additions and 32 deletions
|
@ -652,3 +652,28 @@ async fn test_selection_goal(cx: &mut gpui::TestAppContext) {
|
|||
Lorem Ipsum"})
|
||||
.await;
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_paragraphs_dont_wrap(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = NeovimBackedTestContext::new(cx).await;
|
||||
|
||||
cx.set_shared_state(indoc! {"
|
||||
one
|
||||
ˇ
|
||||
two"})
|
||||
.await;
|
||||
|
||||
cx.simulate_shared_keystrokes(["}", "}"]).await;
|
||||
cx.assert_shared_state(indoc! {"
|
||||
one
|
||||
|
||||
twˇo"})
|
||||
.await;
|
||||
|
||||
cx.simulate_shared_keystrokes(["{", "{", "{"]).await;
|
||||
cx.assert_shared_state(indoc! {"
|
||||
ˇone
|
||||
|
||||
two"})
|
||||
.await;
|
||||
}
|
||||
|
|
8
crates/vim/test_data/test_paragraphs_dont_wrap.json
Normal file
8
crates/vim/test_data/test_paragraphs_dont_wrap.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{"Put":{"state":"one\nˇ\ntwo"}}
|
||||
{"Key":"}"}
|
||||
{"Key":"}"}
|
||||
{"Get":{"state":"one\n\ntwˇo","mode":"Normal"}}
|
||||
{"Key":"{"}
|
||||
{"Key":"{"}
|
||||
{"Key":"{"}
|
||||
{"Get":{"state":"ˇone\n\ntwo","mode":"Normal"}}
|
Loading…
Add table
Add a link
Reference in a new issue