Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Don't use test-only method; add ctrl-j binding
Nathan Sobocde8d7d74726
diff --git a/assets/keymaps/default.json b/assets/keymaps/default.jsonindex a642697a376..84b11b53a10 100644--- a/assets/keymaps/default.json+++ b/assets/keymaps/default.json@@ -411,6 +411,7 @@"ctrl-shift-k": "editor::DeleteLine","cmd-shift-d": "editor::DuplicateLine","cmd-shift-l": "editor::SplitSelectionIntoLines",+ "ctrl-j": "editor::JoinLines","ctrl-cmd-up": "editor::MoveLineUp","ctrl-cmd-down": "editor::MoveLineDown","ctrl-alt-backspace": "editor::DeleteToPreviousSubwordStart",diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex e5fa551b3bf..c8daff3fd5f 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -3956,7 +3956,7 @@ impl Editor {pub fn join_lines(&mut self, _: &JoinLines, cx: &mut ViewContext<Self>) {let mut row_ranges = Vec::<Range<u32>>::new();- for selection in self.selections.ranges::<Point>(cx) {+ for selection in self.selections.all::<Point>(cx) {let start = selection.start.row;let end = if selection.start.row == selection.end.row {selection.start.row + 1