summaryrefslogtreecommitdiff
path: root/src/Text.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text.zig')
-rw-r--r--src/Text.zig6
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