terminal: sliding window search can move the cursor

This commit is contained in:
Mitchell Hashimoto
2024-12-03 13:06:52 -05:00
parent 6ed298c9c1
commit d307b02e40
2 changed files with 75 additions and 5 deletions

View File

@@ -56,6 +56,11 @@ pub fn CircBuf(comptime T: type, comptime default: T) type {
self.idx -|= @intCast(@abs(amount));
}
}
/// Reset the iterator back to the first value.
pub fn reset(self: *Iterator) void {
self.idx = 0;
}
};
/// Initialize a new circular buffer that can store size elements.