refactor(Buffer): remove Plane dependency in Buffer

This commit is contained in:
CJ van den Berg 2024-07-05 00:33:31 +02:00
parent a3a298f721
commit 128182a448
7 changed files with 242 additions and 216 deletions

View file

@ -81,7 +81,7 @@ fn inspect_location(self: *Self, row: usize, col: usize) void {
fn get_buffer_text(self: *Self, buf: []u8, sel: Buffer.Selection) ?[]const u8 {
const root = self.editor.get_current_root() orelse return null;
return root.get_range(sel, buf, null, null, self.plane) catch return null;
return root.get_range(sel, buf, null, null, self.plane.metrix()) catch return null;
}
fn dump_highlight(self: *Self, range: syntax.Range, scope: []const u8, id: u32, _: usize, ast_node: *const syntax.Node) error{Stop}!void {