Fix dw at the end of a soft wrapped line (#13065)

Co-Authored-By: Richard <richard@zed.dev>
Release Notes:

- vim: Fixed behavior of `dw` at the end of a soft wrapped line

Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
Conrad Irwin 2024-06-14 13:18:28 -06:00 committed by GitHub
parent e40c49a143
commit 45ae0dcc2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 30 additions and 8 deletions

View file

@ -1197,3 +1197,17 @@ async fn test_caret_mark(cx: &mut TestAppContext) {
"
});
}
#[cfg(target_os = "macos")]
#[gpui::test]
async fn test_dw_eol(cx: &mut gpui::TestAppContext) {
let mut cx = NeovimBackedTestContext::new(cx).await;
cx.set_shared_wrap(12).await;
cx.set_shared_state("twelve ˇchar twelve char\ntwelve char")
.await;
cx.simulate_shared_keystrokes("d w").await;
cx.shared_state()
.await
.assert_eq("twelve ˇtwelve char\ntwelve char");
}