diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 23:16:01 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:16:28 -0300 |
| commit | 601a5c8a31aaa6c2ce7f20ae7150b1da1ac80e01 (patch) | |
| tree | 3f35b16ae6ef7d552a6b72ac8e93ced4e2079dc6 /src/Text.zig | |
| parent | 3671eb9eafc19549bb94fe839e944e18707316e1 (diff) | |
| download | pardes-601a5c8a31aaa6c2ce7f20ae7150b1da1ac80e01.tar.gz pardes-601a5c8a31aaa6c2ce7f20ae7150b1da1ac80e01.zip | |
Text, normal, modal: the last f/F/t/T is kept as its Find kind (find_op: ?Find), not as the config character that bound it, and findMove and findTarget take the kind instead of two bools; Text's walked shape changes, so a client and a daemon from either side of this change 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/Text.zig')
| -rw-r--r-- | src/Text.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text.zig b/src/Text.zig index da4be590..202cc339 100644 --- a/src/Text.zig +++ b/src/Text.zig @@ -86,7 +86,7 @@ last_edit: ?struct { row: i32, col: i32 } = null, reg_wait: bool = false, normal: modal.Normal.State = .{}, /// last f/F/t/T motion, for Alt-. repeat -find_op: u8 = 0, +find_op: ?modal.Normal.Find = null, find_ch: u21 = 0, ed_undo: [terminal.history_max]terminal.Snapshot = undefined, ed_undo_len: usize = 0, @@ -508,9 +508,9 @@ pub fn wordMove(t: *Text, text: []const u8, range: modal.Selection, cnt: usize, } /// f/t/F/T: anchor at the old cursor cell, head on the hit (not found: no move) -pub fn findMove(t: *Text, text: []const u8, range: modal.Selection, ch: u21, fwd: bool, till: bool, cnt: usize) void { +pub fn findMove(t: *Text, text: []const u8, range: modal.Selection, ch: u21, kind: modal.Normal.Find, cnt: usize) void { const cur = modal.selectionCursor(text, range); - const target = modal.findTarget(text, cur, ch, fwd, till, cnt) orelse return; + const target = modal.findTarget(text, cur, ch, kind, cnt) orelse return; const res = if (t.select) modal.moveSelectionCursor(text, range, target, true) else |
