From 8eaddfb6ee27503e92125a6a54e8746949a869e0 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sat, 17 Aug 2024 23:28:01 +0200 Subject: [PATCH] fix: don't truncate line numbers in filelist_view --- src/tui/filelist_view.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui/filelist_view.zig b/src/tui/filelist_view.zig index 5293820..2ebb025 100644 --- a/src/tui/filelist_view.zig +++ b/src/tui/filelist_view.zig @@ -162,7 +162,7 @@ fn handle_render_menu(self: *Self, button: *Button.State(*Menu.State(*Self)), th var removed_prefix: usize = 0; const max_len = self.view_cols / path_column_ratio; button.plane.set_style(style_base); - _ = button.plane.print("{s}:{d}", .{ root.shorten_path(&buf, entry.path, &removed_prefix, max_len - 6), entry.begin_line + 1 }) catch {}; + _ = button.plane.print("{s}:{d}", .{ root.shorten_path(&buf, entry.path, &removed_prefix, max_len - 7), entry.begin_line + 1 }) catch {}; button.plane.cursor_move_yx(0, @intCast(max_len)) catch return false; button.plane.set_style(style_separator); _ = button.plane.print(" ▏", .{}) catch {};