summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/exec.zig b/src/exec.zig
index 4bdb2584..1ee57520 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -953,7 +953,6 @@ pub const acme_words = [_]struct { acme: []const u8, pardes: ?[]const u8, hint:
.{ .acme = "Load", .pardes = "Restore" },
.{ .acme = "ID", .pardes = null },
.{ .acme = "Send", .pardes = null },
- .{ .acme = "Tab", .pardes = null },
.{ .acme = "Indent", .pardes = null, .hint = ": Enter, o and O keep the indent always" },
.{ .acme = "Local", .pardes = null },
.{ .acme = "Abort", .pardes = null, .hint = ": a debugging word that crashes acme" },
@@ -1120,6 +1119,13 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
}
if (!p.settings.apply(setting, want)) p.reportFailure(p.active, "Shell: takes " ++ comptime config.Runtime.takes(.shell).?);
},
+ // Bare, it says the width, as acme's Tab does.
+ .tab => if (arg == null) {
+ var said: [32]u8 = undefined;
+ return p.setMessage(p.active, std.fmt.bufPrint(&said, "Tab {d}", .{p.settings.tab}) catch "Tab");
+ } else if (!p.settings.apply(setting, arg)) {
+ p.reportFailure(p.active, "Tab: takes " ++ comptime config.Runtime.takes(.tab).?);
+ },
// Said with what it takes: its words, its range.
else => if (!p.settings.apply(setting, arg)) {
var text: [160]u8 = undefined;
@@ -1133,7 +1139,7 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
if (pane.file) |*file| file.syntax_dirty = true;
}
}
- if (p.settings.tree_context_tag_style != previous_context_style) {
+ if (p.settings.tree_context_tag_style != previous_context_style or setting.action == .tab) {
for (p.panes, 0..) |slot, id| {
p.surface.body_layers[id].rows = 0;
const pane = slot orelse continue;