summaryrefslogtreecommitdiff
path: root/src/normal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 15:31:55 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit4315121885bebd48f8c03a2b1c7b0bd943c67afd (patch)
treeb9072c654cd486a7e817c7c3377bc49716e3afd2 /src/normal.zig
parente35e4654c34cf303cf3bc6077a3cbffee70f7909 (diff)
downloadpardes-4315121885bebd48f8c03a2b1c7b0bd943c67afd.tar.gz
pardes-4315121885bebd48f8c03a2b1c7b0bd943c67afd.zip
Alt-J joins lines and selects the spaces it put in
helix-golf's text_into_array turns lines into an array with %<A-s>ms"<A-J>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 <[email protected]>
Diffstat (limited to 'src/normal.zig')
-rw-r--r--src/normal.zig3
1 files changed, 2 insertions, 1 deletions
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),