fix: don't truncate line numbers in filelist_view

This commit is contained in:
CJ van den Berg 2024-08-17 23:28:01 +02:00
parent 5fdcdba4b8
commit 8eaddfb6ee

View file

@ -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 {};