diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-27 22:13:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | f1025c18a78c02ebf157f0e3a5d9552605c082e8 (patch) | |
| tree | d5e394baa9b74ed20b2e5549fbbc7f24917caa2a /test | |
| parent | ff953a6236ebdf97c73deda86fd9005906a2071b (diff) | |
| download | pardes-f1025c18a78c02ebf157f0e3a5d9552605c082e8.tar.gz pardes-f1025c18a78c02ebf157f0e3a5d9552605c082e8.zip | |
Move helix normal mode out of pardes.zig into normal.zig
Pure move, no behaviour change: the key-to-role matching (isPrefix,
roleBindingName, normalInput), multiOnce, the selection regex prompt
(startSelRegex, selRegexArmed, applySelRegex), KeyState, Replay and
replaySels, handleNormal, executeNormalAction and handlePdfNormal, with two
tests, go verbatim to normal.zig.
The methods become free functions taking `p: *Pardes`; their 22 call sites
(handleKey, the mouse, look walk, lsp, runBuiltin, body drawing and edit.zig)
change from `p.handleNormal(..)` to `normal.handleNormal(p, ..)`.
test/lspbench.zig's second anchor follows its needle into src/normal.zig.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/lspbench.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lspbench.zig b/test/lspbench.zig index 7c4e8753..36969680 100644 --- a/test/lspbench.zig +++ b/test/lspbench.zig @@ -41,7 +41,7 @@ const anchors = [_]Anchor{ .{ .file = "test/lspfixture/broken.zig", .needle = "unused_local", .at = 0, .kind = .workspace_diagnostics, .expect = "broken.zig" }, .{ .file = "src/lsp/lsp.zig", .needle = "std.mem.count(u8", .at = 4, .kind = .completion, .expect = "std.zig" }, .{ .file = "src/lsp/lsp_zls.zig", .needle = ".declaration => try rowForToken", .at = 1, .kind = .completion, .expect = "type_definition" }, - .{ .file = "src/pardes.zig", .needle = ".definition => .definition,", .at = 1, .kind = .completion, .expect = "" }, + .{ .file = "src/normal.zig", .needle = ".definition => .definition,", .at = 1, .kind = .completion, .expect = "" }, // The repeated name proves the result includes the declaration, not just the cursor line. .{ .file = "test/lspfixture/dotcomplete.zig", .needle = "return switch (s) {\n .", .at = 29, .kind = .completion, .expect = "verdigris verdigris," }, // Indentation keeps the fixture header from becoming the first needle match. |
