summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index ae6c4cbc..da6e540c 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -6798,7 +6798,11 @@ pub const Pardes = struct {
/// ponytail: mvzr searches from each match's end, so `^` and `$` assert
/// against THAT position rather than against a line the way helix's
/// multi_line regex does, and `.` matches a newline like any other byte.
- /// Both are waived cases; `[^\n]` is the workaround for the second.
+ /// Both are waived. `[^\n]` LOOKS like the workaround for the second and
+ /// must not be suggested as one: the live preview compiles every prefix,
+ /// and the prefix `[^\` panics mvzr (index out of bounds in parseCharSet,
+ /// mvzr.zig valueFor) before the pattern can ever be finished. Guarding
+ /// the compile is what would make the advice sayable.
fn applySelRegex(p: *Pardes, pane: *Pane, pat: []const u8, split: bool) void {
const pl = p.paneCursorLines(pane) catch return;
const text = p.flatSurface(pane, pl) catch return;