refactor: minor formatting clean-up in open_recent

This commit is contained in:
CJ van den Berg 2024-08-11 21:37:25 +02:00
parent c53067a7cd
commit 8abeea6c98

View file

@ -10,6 +10,7 @@ const key = @import("renderer").input.key;
const mod = @import("renderer").input.modifier; const mod = @import("renderer").input.modifier;
const event_type = @import("renderer").input.event_type; const event_type = @import("renderer").input.event_type;
const ucs32_to_utf8 = @import("renderer").ucs32_to_utf8; const ucs32_to_utf8 = @import("renderer").ucs32_to_utf8;
const project_manager = @import("project_manager");
const tui = @import("../../tui.zig"); const tui = @import("../../tui.zig");
const command = @import("../../command.zig"); const command = @import("../../command.zig");
@ -20,7 +21,6 @@ const InputBox = @import("../../InputBox.zig");
const Menu = @import("../../Menu.zig"); const Menu = @import("../../Menu.zig");
const Widget = @import("../../Widget.zig"); const Widget = @import("../../Widget.zig");
const mainview = @import("../../mainview.zig"); const mainview = @import("../../mainview.zig");
const project_manager = @import("project_manager");
const Self = @This(); const Self = @This();
const max_recent_files: usize = 25; const max_recent_files: usize = 25;
@ -101,7 +101,7 @@ fn on_render_menu(_: *Self, button: *Button.State(*Menu.State(*Self)), theme: *c
file_path = "#ERROR#"; file_path = "#ERROR#";
button.plane.set_style(style_keybind); button.plane.set_style(style_keybind);
const pointer = if (selected) "" else " "; const pointer = if (selected) "" else " ";
_ = button.plane.print("{s}", .{ pointer }) catch {}; _ = button.plane.print("{s}", .{pointer}) catch {};
var buf: [std.fs.max_path_bytes]u8 = undefined; var buf: [std.fs.max_path_bytes]u8 = undefined;
var removed_prefix: usize = 0; var removed_prefix: usize = 0;
const max_len = max_menu_width() - 2; const max_len = max_menu_width() - 2;