summaryrefslogtreecommitdiff
path: root/core/builtins.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/builtins.zig')
-rw-r--r--core/builtins.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/builtins.zig b/core/builtins.zig
index 7ad70e7c..b516d543 100644
--- a/core/builtins.zig
+++ b/core/builtins.zig
@@ -1060,6 +1060,15 @@ pub const Filter = struct {
}
};
+/// Turn a text's syntax colours off in this view, or on again.
+/// The ink layer (File.Layers).
+pub const Syntax = struct {
+ pub fn run(c: Ctx) void {
+ if (c.pane.file == null) return c.p.reportFailure(c.id, "Syntax: only a text pane has it");
+ c.pane.layers.ink = !c.pane.layers.ink;
+ }
+};
+
/// Stack a diff's hunks as a diff viewer shows them, each under its place and the declarations around it, in a +Diff; on a +Diff, show the diff itself as text. `Diff <file>` stacks that diff's, `Diff <revision>` git show's.
/// The diff viewer's one registration: its word and traits here, all else
/// its own (hunks.zig).