feat: add support for specifying byte positions in filelist_view

This commit is contained in:
CJ van den Berg 2025-08-17 22:32:44 +02:00
parent 7207b0435e
commit 4188e25df9
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -46,6 +46,7 @@ const Entry = struct {
end_pos: usize,
lines: []const u8,
severity: editor.Diagnostic.Severity = .Information,
pos_type: editor.PosType,
};
pub fn create(allocator: Allocator, parent: Plane) !Widget {
@ -250,6 +251,7 @@ fn handle_menu_action(menu: **Menu.State(*Self), button: *Button.State(*Menu.Sta
if (entry.begin_pos == 0) 0 else entry.begin_pos + 1,
entry.end_line,
entry.end_pos + 1,
entry.pos_type,
},
} }) catch |e| self.logger.err("navigate", e);
}