diff --git a/assets/keymaps/default.json b/assets/keymaps/default.json index a642697a3765e81c62b2c7808847c9be29535a88..84b11b53a1086ef0c5a422213c50a4cb5961ed33 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.rs index e5fa551b3bfa4d4a5b99bb52c5a5ef8991574131..c8daff3fd5ff2b5609c65763b141cd30e18ffd23 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) { let mut row_ranges = Vec::>::new(); - for selection in self.selections.ranges::(cx) { + for selection in self.selections.all::(cx) { let start = selection.start.row; let end = if selection.start.row == selection.end.row { selection.start.row + 1