From 5cf50930dee214fb641bb95bbf8639b8f76930d9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 11:12:10 -0300 Subject: Normal mode's s and S search as addr does, through one shared regexp.zig The sam-style calling convention for mvzr (a line per haystack, . made [^\\n] only when a pattern names \\n) lived in addr.zig; normal mode's s and S called mvzr over the raw selection, where ^ meant the selection's start and . crossed lines. src/regexp.zig now holds the one Regex (compile, find) both call, and fs.zig and pardes.zig drop an unused mvzr import. hxdiff and hxparity stay at their known 17 and 6 mismatches, none of them regex cases. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/fs.md') diff --git a/docs/fs.md b/docs/fs.md index c54cfc4d..af57a468 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -274,6 +274,8 @@ takes the longest (`/gam|gamma/` finds `gam`); in a search begun in the middle of a line, `^` inside an alternation can match there; and in a pattern that spans lines, `^`, `$` and `[^...]` keep mvzr's own meaning. pardes has no regex engine of its own on purpose; these are its limits. +Normal mode's `s` and `S` search a selection the same way (src/regexp.zig +is the one place both call), so `^` there also means a line's start. An address that does not evaluate fails the write with why: `bad address syntax`, `no match for regexp`, `address out of range` or `bad regular -- cgit v1.3