summaryrefslogtreecommitdiff
path: root/core/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/config.zig')
-rw-r--r--core/config.zig29
1 files changed, 22 insertions, 7 deletions
diff --git a/core/config.zig b/core/config.zig
index dc1d98dc..d500cdcb 100644
--- a/core/config.zig
+++ b/core/config.zig
@@ -239,8 +239,20 @@ pub const child_term = "xterm-256color";
pub const child_colorterm = "truecolor";
pub const child_term_program = "pardes";
-// Fonts is the window's word alone (the font picker), so a terminal build's
-// row has no such builtin to name: the window's row and the terminal's.
+/// The window row's words (UX K'2): at its right end, `Restore <dump>`
+/// after them once a dump exists (tagline.headerWords). The rest of the
+/// words that left it run from `:`, their keys and typed (K'4).
+pub const window_words_str = "Find Grep Newcol Help Exit";
+/// A column's words: at the window row's left while there is one column,
+/// in its column tag with several, where Joincol and Delcol have a
+/// column to act on.
+pub const column_words_str = "New Term";
+pub const columns_words_str = "New Term Joincol Delcol";
+
+// The window's tag before UX K', its own text then: a dump's own text equal
+// to one is dropped (dump.dropOldTags), and /tagexec still takes their words
+// (ninep/cols.zig paneWord). Fonts is the window's word alone (the font
+// picker), so a terminal build's row has no such builtin to name.
pub const topbar_window_str = "Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Fonts Config History Debug Exit";
pub const topbar_terminal_str = "Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit";
pub const topbar_str = if (@import("builtins.zig").capabilities.font_picker) topbar_window_str else topbar_terminal_str;
@@ -1564,13 +1576,16 @@ const doc_typ = struct {
if (w.end > 0) w.writeByte(' ') catch return false;
w.writeAll(x[0 .. std.mem.indexOfScalar(u8, x, '+') orelse x.len]) catch return false;
}
- // Both rows: the docs and the tutor show the window's and the terminal's.
- const tags = [_][]const u8{ topbar_window_str, topbar_terminal_str, @import("tagline.zig").column_tag_default, pane_builtins_str, file_pane_builtins_str, diff_pane_builtins_str, pager_pane_builtins_str, pager_diff_pane_builtins_str, diff_view_builtins_str, terminal_pane_builtins_str, command_pane_builtins_str, dir_pane_builtins_str };
+ // The window row's and the column tags' words (UX K'2), and K'3's
+ // computed words of a pane at rest: a file reading, held, edited,
+ // a +New typed into, a running command, a directory, a pager, a
+ // terminal with its shell's word.
+ const tags = [_][]const u8{ window_words_str, column_words_str, columns_words_str, "Keep Del", "Del", "Save Undo Del", "Undo Del", "Kill Del", "Get Del", "Filter Del", "Del Term" };
for (tags) |d| if (std.mem.eql(u8, d, w.buffered())) return true;
- // A kind's pane's: Term, its addon's words, Collapse Del (Kind.zig).
+ // A kind's pane's: its addon's words, then Del (Kind.zig).
const shown = w.buffered();
- if (!std.mem.startsWith(u8, shown, "Term ") or !std.mem.endsWith(u8, shown, " Collapse Del")) return false;
- var mid = std.mem.tokenizeScalar(u8, shown["Term ".len .. shown.len - " Collapse Del".len], ' ');
+ if (!std.mem.endsWith(u8, shown, " Del")) return false;
+ var mid = std.mem.tokenizeScalar(u8, shown[0 .. shown.len - " Del".len], ' ');
while (mid.next()) |x| {
if (!addonWord(x)) return false;
}