summaryrefslogtreecommitdiff
path: root/src/body_layer.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-27 22:13:34 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commitf1025c18a78c02ebf157f0e3a5d9552605c082e8 (patch)
treed5e394baa9b74ed20b2e5549fbbc7f24917caa2a /src/body_layer.zig
parentff953a6236ebdf97c73deda86fd9005906a2071b (diff)
downloadpardes-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 'src/body_layer.zig')
-rw-r--r--src/body_layer.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/body_layer.zig b/src/body_layer.zig
index 8c345b97..6bac7018 100644
--- a/src/body_layer.zig
+++ b/src/body_layer.zig
@@ -5,6 +5,7 @@
//! and cursor.
const std = @import("std");
const pardes = @import("pardes.zig");
+const normal = @import("normal.zig");
const edit = @import("edit.zig");
const config = @import("config.zig");
const limits = @import("memory.zig").limits;
@@ -386,7 +387,7 @@ pub fn renderBody(p: *Pardes, arena: std.mem.Allocator, pane: *Pane, r: Rect, id
}
}
}
- const preview = Pardes.selRegexArmed(pane) != null;
+ const preview = normal.selRegexArmed(pane) != null;
const show_prim = (pane.mode == .normal and pane.vsel.active) or preview or
(modal_hover and pane.vsel.active);
const show_extra = pane.mode != .tty and pane.nsel > 0;