From 4315121885bebd48f8c03a2b1c7b0bd943c67afd Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 15:31:55 -0300 Subject: Alt-J joins lines and selects the spaces it put in helix-golf's text_into_array turns lines into an array with %ms"i,: join_selections_space joins like J and leaves one cursor on each space it inserted. J and Alt-J now make one edit over every range, as helix does, rather than J being replayed per range; that is what lets Alt-J hand back all the spaces as the new selection. Co-Authored-By: Claude Opus 5.5 --- src/normal.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/normal.zig') diff --git a/src/normal.zig b/src/normal.zig index da707e26..c976823c 100644 --- a/src/normal.zig +++ b/src/normal.zig @@ -540,7 +540,8 @@ fn executeNormalAction(p: *Pardes, t: *Text, semantic: modal.Normal.Action) void .switch_case => return edit.normalCase(p, t, .toggle), .lowercase => return edit.normalCase(p, t, .lower), .uppercase => return edit.normalCase(p, t, .upper), - .join_lines => return edit.normalJoin(p, t), + .join_lines => return edit.normalJoin(p, t, false), + .join_select_space => return edit.normalJoin(p, t, true), .indent => return edit.normalIndent(p, t, op.count, true), .unindent => return edit.normalIndent(p, t, op.count, false), .comment_toggle => return edit.normalToggleComment(p, t), -- cgit v1.3