summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/config.zig b/src/config.zig
index 3d5de631..6f45adba 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -111,9 +111,6 @@ pub const leader_path = paths: {
.Newcol = "cn",
.Delcol = "cd",
.Joincol = "cj",
- .SearchPlace = null,
- .SearchPane = null,
- .SearchRows = null,
.Search = null,
.Panes = null,
.More = null,
@@ -745,21 +742,10 @@ pub const Runtime = struct {
/// is what the drawing and the column arithmetic read).
tab: u16 = tab_width,
callstack_depth: u8 = @import("lsp/lsp.zig").callstack_default_depth,
- /// Where a query pane goes (Query.zig): `attached`, under the pane that
- /// asked, out of its rows alone; `column`, in the finder column.
- search_place: SearchPlace = .attached,
- /// A search from a pane that has a query pane: `reuse` it (its frozen
- /// rows back on Esc), or open a `new` one, the last left where it is.
- search_pane: SearchPane = .reuse,
- /// The body rows a query pane is born with under its line 1 (and its
- /// +Preview with): it never resizes itself after.
- search_rows: u16 = 8,
pub const JumpScope = enum { file, all };
- pub const SearchPlace = enum { attached, column };
- pub const SearchPane = enum { reuse, new };
/// A setting that is one of a few words, each an enum field of Runtime.
- pub const Choice = enum { jump_scope, search_place, search_pane, pet };
+ pub const Choice = enum { jump_scope, pet };
pub const Pet = enum { off, cat, frog };
pub const tagline_percent_min: u8 = 1;
@@ -846,7 +832,6 @@ pub const Runtime = struct {
grip_width,
tab,
callstack_depth,
- search_rows,
choice: Choice,
};
@@ -904,9 +889,6 @@ pub const Runtime = struct {
.{ .word = "JumpScope", .action = .{ .choice = .jump_scope }, .doc = "What Back and Forward keep to: file, the focused pane's file until it runs out that way, or all, every place in order." },
.{ .word = "CallstackDepth", .action = .callstack_depth, .doc = "Caller levels collected by Callstack, 1 through 64; default 8. Bare, it says the current limit." },
.{ .word = "Tab", .action = .tab, .doc = "A tab's width in cells, 1 through 16, in every pane; bare, it says the width." },
- .{ .word = "SearchPlace", .action = .{ .choice = .search_place }, .doc = "Where a query pane goes: attached, under the pane that asked, out of its rows alone, or column, in the finder column." },
- .{ .word = "SearchPane", .action = .{ .choice = .search_pane }, .doc = "A search from a pane that has a query pane: reuse it, or open a new one and leave the last where it is." },
- .{ .word = "SearchRows", .action = .search_rows, .doc = "The rows a query pane is born with under its line 1, 1 through 100; default 8. It never resizes itself." },
};
pub fn find(name: []const u8) ?Setting {
@@ -988,7 +970,6 @@ pub const Runtime = struct {
.grip_width => state.grip_width = number(u16, argument, " \t\r\n%", 50, 300) orelse return false,
.callstack_depth => state.callstack_depth = number(u8, argument, " \t\r\n", 1, @import("lsp/lsp.zig").callstack_max_depth) orelse return false,
.tab => state.tab = number(u16, argument, " \t\r\n", 1, 16) orelse return false,
- .search_rows => state.search_rows = number(u16, argument, " \t\r\n", 1, 100) orelse return false,
.theme, .font => return false,
}
return true;
@@ -1022,7 +1003,6 @@ pub const Runtime = struct {
.grip_width => "50-300 (a percentage)",
.tab => "1-16 (cells)",
.callstack_depth => "1-64 (levels)",
- .search_rows => "1-100 (rows)",
.tagline_size => std.fmt.comptimePrint("{d}-{d} (a percentage)", .{ tagline_percent_min, tagline_percent_max }),
.message_linger => std.fmt.comptimePrint("0-{d} (milliseconds)", .{message_ms_max}),
.shell => "a path of at most 255 bytes; bare, $SHELL, else /bin/sh",
@@ -1112,7 +1092,7 @@ pub const Runtime = struct {
else
try out.print("{s} {s}\n", .{ setting.word, context.theme_name }),
// A number in a field named as its action.
- inline .window_opacity, .window_blur, .inactive_dim, .callstack_depth, .tab, .search_rows, .grip_width => |_, tag| try out.print("{s} {d}\n", .{ setting.word, @field(state, @tagName(tag)) }),
+ inline .window_opacity, .window_blur, .inactive_dim, .callstack_depth, .tab, .grip_width => |_, tag| try out.print("{s} {d}\n", .{ setting.word, @field(state, @tagName(tag)) }),
.dump_dir => {
const dir = if (state.dump_dir.len > 0) state.dump_dir.get() else context.default_dump_dir;
if (dir.len > 0) try out.print("{s} {s}\n", .{ setting.word, dir }) else try out.print("# {s} (none)\n", .{setting.word});
@@ -1314,9 +1294,9 @@ pub const Runtime = struct {
const values = [_][2][]const u8{
.{ "TaglineSize", "73" }, .{ "WindowOpacity", "85" }, .{ "WindowBlur", "40" },
.{ "MessageLinger", "1500" }, .{ "DumpDir", "~/dumps" },
- .{ "JumpScope", "all" }, .{ "SearchPlace", "column" }, .{ "SearchPane", "new" },
+ .{ "JumpScope", "all" },
.{ "GripWidth", "200" }, .{ "InactiveDim", "35" }, .{ "CallstackDepth", "16" },
- .{ "Tab", "8" }, .{ "SearchRows", "12" },
+ .{ "Tab", "8" },
};
for (values) |v| try std.testing.expect(apply(&state, find(v[0]).?, v[1]));
try std.testing.expect(state.font.requested_name.set("Wanted Mono"));