diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-15 13:21:29 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:24:42 -0300 |
| commit | 2bdde8c5ec1049ea0f575c6f9165ed4cef00ea50 (patch) | |
| tree | 0d7879e387223bd19d78a295bee0ba7ab3a62e00 /src/dump.zig | |
| parent | 8ec8924cd577f71953f8e420af1cd60da92f3300 (diff) | |
| download | pardes-2bdde8c5ec1049ea0f575c6f9165ed4cef00ea50.tar.gz pardes-2bdde8c5ec1049ea0f575c6f9165ed4cef00ea50.zip | |
Align location results and configure source context
Diffstat (limited to 'src/dump.zig')
| -rw-r--r-- | src/dump.zig | 14 |
1 files changed, 14 insertions, 0 deletions
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 = &.{}, |
