summaryrefslogtreecommitdiff
path: root/src/normal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 00:05:42 -0300
committerGabriel Schneider <[email protected]>2026-11-05 01:16:28 -0300
commit8d647e9c9fc747c14a222a53f9e3db1ba7a07d01 (patch)
tree9f935408a95fab551b5882c834fbf19352fdbc67 /src/normal.zig
parenta92951b11ab3aa2cdf759b3b743f8af006c21b95 (diff)
downloadpardes-8d647e9c9fc747c14a222a53f9e3db1ba7a07d01.tar.gz
pardes-8d647e9c9fc747c14a222a53f9e3db1ba7a07d01.zip
pardes, normal, edit: multi_on goes: outside a replay the replay state means one range, its first pass (index 0, count 1, first true), so setYank, registerValue, pushUndo and the open-lines and Tab checks read it plainly; Pardes's walked shape changes, so a client and a daemon from either side refuse each other (wire semantics)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/normal.zig')
-rw-r--r--src/normal.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/normal.zig b/src/normal.zig
index 34f5ef58..9e47cf45 100644
--- a/src/normal.zig
+++ b/src/normal.zig
@@ -48,7 +48,6 @@ fn normalInput(key: Key) modal.Normal.Input {
}
pub fn multiOnce(p: *Pardes) bool {
- if (!p.multi_on) return true;
p.multi_stop = true;
return p.multi_first;
}
@@ -527,7 +526,6 @@ pub fn replaySels(p: *Pardes, t: *Text, what: Replay) void {
// each pass's result: cursor and anchor cells as distances from the
// end of the surface text, plus the range's own j/k goal column
var res: [Text.max_selections]struct { cur: usize, anc: usize, sticky: i32 } = undefined;
- p.multi_on = true;
p.multi_stop = false;
var passes: usize = 0;
var i: usize = n;
@@ -569,8 +567,9 @@ pub fn replaySels(p: *Pardes, t: *Text, what: Replay) void {
co;
res[i] = .{ .cur = text.len - @min(co, text.len), .anc = text.len - @min(ao, text.len), .sticky = t.sticky_col };
}
- p.multi_on = false;
- p.multi_first = false;
+ p.multi_first = true;
+ p.multi_index = 0;
+ p.multi_count = 1;
if (p.multi_stop) {
p.multi_stop = false;
if (owner != null) {