From ee6c33ffb358a8f20ea9f32a8125010492ec4495 Mon Sep 17 00:00:00 2001 From: 5brian Date: Wed, 9 Apr 2025 16:29:03 -0400 Subject: [PATCH] Fix vim test keystroke (#28406) I wrote the test wrongly in https://github.com/zed-industries/zed/pull/28005: It should be `$` instead of `shift-4`, so it was just yanking from the middle of the line instead of the newline character. Fixed it and regenerated it. Release Notes: - N/A --- crates/vim/src/visual.rs | 3 +-- crates/vim/test_data/test_visual_yank.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/vim/src/visual.rs b/crates/vim/src/visual.rs index de044575c52f9a19c3e2a1d468c5e5ce954d4cec..a96d49a43c4c8639b302bb40b4e125f5b576a3dc 100644 --- a/crates/vim/src/visual.rs +++ b/crates/vim/src/visual.rs @@ -1155,8 +1155,7 @@ mod test { fox ˇjumps over the lazy dog"}) .await; - cx.simulate_shared_keystrokes("shift-v shift-4 shift-y") - .await; + cx.simulate_shared_keystrokes("shift-v $ shift-y").await; cx.shared_state().await.assert_eq(indoc! {" The quick brown ˇfox jumps over diff --git a/crates/vim/test_data/test_visual_yank.json b/crates/vim/test_data/test_visual_yank.json index 0b41f4cfd20b7f6e9d1cd71419efb8eb47460bc1..ed1ff2eb3f51522e5357d17293313dcb26bf049b 100644 --- a/crates/vim/test_data/test_visual_yank.json +++ b/crates/vim/test_data/test_visual_yank.json @@ -36,7 +36,7 @@ {"ReadRegister":{"name":"\"","value":"fox jumps over\nthe lazy dog\n"}} {"Put":{"state":"The quick brown\nfox ˇjumps over\nthe lazy dog"}} {"Key":"shift-v"} -{"Key":"shift-4"} +{"Key":"$"} {"Key":"shift-y"} {"Get":{"state":"The quick brown\nˇfox jumps over\nthe lazy dog","mode":"Normal"}} {"ReadRegister":{"name":"\"","value":"fox jumps over\n"}}