Add better and configurable shortcuts.
This commit is contained in:
@@ -115,6 +115,21 @@ pub fn build(b: *std.Build) void {
|
||||
settings_tests.root_module.addImport("ghostty-vt", ghostty.module("ghostty-vt"));
|
||||
test_step.dependOn(&b.addRunArtifact(settings_tests).step);
|
||||
|
||||
// The shortcut table is its own root for the same reason: chords are parsed
|
||||
// from text, written back out as text, and looked up by a key press, and
|
||||
// all three are pure data. It reaches libghostty-vt for the key enum and
|
||||
// nothing else, which is what keeps it — and the settings tests above, which
|
||||
// import it — off GTK.
|
||||
const shortcut_tests = b.addTest(.{
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/shortcuts.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
shortcut_tests.root_module.addImport("ghostty-vt", ghostty.module("ghostty-vt"));
|
||||
test_step.dependOn(&b.addRunArtifact(shortcut_tests).step);
|
||||
|
||||
// A second root for the same reason, one step further out: `emoji.zig` is a
|
||||
// table and a search over it, and it imports nothing at all. It cannot hang
|
||||
// off the root above because a test binary has exactly one root, and
|
||||
|
||||
Reference in New Issue
Block a user