refactor: remove obsolete json config file writing support

json config files can still be read, but no longer written.
This commit is contained in:
CJ van den Berg 2026-01-27 17:39:24 +01:00
parent 32f4bcec3a
commit 2609ce4fbc
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 8 additions and 26 deletions

View file

@ -349,7 +349,7 @@ fn open_style_config(self: *Self, Style: type) command.Result {
tui.reset_drag_context();
try self.create_editor();
try command.executeName("open_scratch_buffer", command.fmt(.{
file_name[0 .. file_name.len - ".json".len],
file_name,
conf.written(),
"conf",
}));
@ -640,13 +640,13 @@ const cmds = struct {
pub fn open_config(_: *Self, _: Ctx) Result {
const file_name = try root.get_config_file_name(@import("config"));
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name[0 .. file_name.len - 5] } });
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name } });
}
pub const open_config_meta: Meta = .{ .description = "Edit configuration" };
pub fn open_gui_config(_: *Self, _: Ctx) Result {
const file_name = try root.get_config_file_name(@import("gui_config"));
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name[0 .. file_name.len - ".json".len] } });
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name } });
}
pub const open_gui_config_meta: Meta = .{ .description = "Edit gui configuration" };