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/helix-keys.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/helix-keys.md') diff --git a/docs/helix-keys.md b/docs/helix-keys.md index f46f5234..0f847405 100644 --- a/docs/helix-keys.md +++ b/docs/helix-keys.md @@ -245,7 +245,11 @@ re-runs the final pattern down the same path, so a submit can never disagree with what is on screen. Pressed in a tag, column tag or workspace tag they select in that tag's own text, and so does `|` pipe it; `/` searches the body wherever it is pressed (`Pane.prompt_for`). Engine: **mvzr** (`build.zig.zon`), a bytecode VM that -compiles a runtime pattern with no allocator. +compiles a runtime pattern with no allocator, called the way sam searches +(`src/regexp.zig`, shared with a pane's `addr` file): each line is its own +haystack, so `^` and `$` match at every line's start and end and `.` never +crosses a newline, and a pattern naming `\n` runs over the whole selection. +Where helix's `^` is only the selection's start, this is sam's. | Key | Behavior | Notes | Status | | --- | --- | --- | --- | -- cgit v1.3