From 2bdde8c5ec1049ea0f575c6f9165ed4cef00ea50 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 15 Sep 2026 13:21:29 -0300 Subject: Align location results and configure source context --- src/dump.zig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/dump.zig') diff --git a/src/dump.zig b/src/dump.zig index 8200b0b7..7380c1ed 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -74,12 +74,25 @@ pub const Terminal = struct { cursor: Cursor = .{}, }; +pub const LocationRow = struct { + kind: enum { match, context }, + path: []const u8, + line: usize, + col: usize = 0, + end_line: usize = 0, + end_col: usize = 0, + location_end: usize, + code_start: usize, + colors_b64: []const u8 = "", +}; + pub const File = struct { path: []const u8 = "", content: []const u8 = "", content_b64: []const u8 = "", dirty: bool = false, tree_context: bool = false, + location_rows: []const LocationRow = &.{}, // Builtin names remain stable when enum ordinals change. origin: []const u8 = "", origin_arg: []const u8 = "", @@ -135,6 +148,7 @@ pub const State = struct { topbar: []const u8 = "", topbar_custom: ?[]const u8 = null, theme: []const u8 = "dark", + locations_config: @import("locations_config.zig").Config = .{}, columns: []const Column = &.{}, panes: []const Pane = &.{}, mounts: []const Mount = &.{}, -- cgit v1.3