Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Revert YankEndOfLine default (part of PR #39143) (#39626)

David Kleingelda65a8bea431c
diff --git a/assets/keymaps/vim.json b/assets/keymaps/vim.json
index ae6bc8391e3..4d296667ff5 100644
--- a/assets/keymaps/vim.json
+++ b/assets/keymaps/vim.json
@@ -240,7 +240,7 @@
"delete": "vim::DeleteRight",
"g shift-j": "vim::JoinLinesNoWhitespace",
"y": "vim::PushYank",
- "shift-y": "vim::YankToEndOfLine",
+ "shift-y": "vim::YankLine",
"x": "vim::DeleteRight",
"shift-x": "vim::DeleteLeft",
"ctrl-a": "vim::Increment",
@@ -393,7 +393,7 @@
"escape": "editor::Cancel",
"shift-d": "vim::DeleteToEndOfLine",
"shift-j": "vim::JoinLines",
- "shift-y": "vim::YankToEndOfLine",
+ "shift-y": "vim::YankLine",
"shift-i": "vim::InsertFirstNonWhitespace",
"shift-a": "vim::InsertEndOfLine",
"o": "vim::InsertLineBelow",
diff --git a/crates/vim/src/normal.rs b/crates/vim/src/normal.rs
index a65b9d827f1..bf45129021d 100644
--- a/crates/vim/src/normal.rs
+++ b/crates/vim/src/normal.rs
@@ -2000,14 +2000,6 @@ mod test {
cx.shared_state().await.assert_eq("// hello\n// ˇ\n// x\n");
}
- #[gpui::test]
- async fn test_yank_to_end_of_line(cx: &mut gpui::TestAppContext) {
- let mut cx = NeovimBackedTestContext::new(cx).await;
- cx.set_shared_state("heˇllo\n").await;
- cx.simulate_shared_keystrokes("Y p").await;
- cx.shared_state().await.assert_eq("helllˇolo\n");
- }
-
#[gpui::test]
async fn test_yank_line_with_trailing_newline(cx: &mut gpui::TestAppContext) {
let mut cx = NeovimBackedTestContext::new(cx).await;
diff --git a/crates/vim/test_data/test_yank_to_end_of_line.json b/crates/vim/test_data/test_yank_to_end_of_line.json
deleted file mode 100644
index 8ad09ec0f11..00000000000
--- a/crates/vim/test_data/test_yank_to_end_of_line.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{"Put":{"state":"heˇllo\n"}}
-{"Key":"Y"}
-{"Key":"p"}
-{"Get":{"state":"helllˇolo\n","mode":"Normal"}}