refactor: move Layer.cache_storage to Layer.View.cache_storage

This commit is contained in:
CJ van den Berg 2025-12-08 14:35:11 +01:00
parent b6b1f02565
commit 19569fc18c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -10,11 +10,11 @@ view: View,
y_off: i32 = 0,
x_off: i32 = 0,
plane_: Plane,
cache_storage: GraphemeCache.Storage = .{},
const View = struct {
allocator: std.mem.Allocator,
screen: vaxis.Screen,
cache_storage: GraphemeCache.Storage = .{},
pub const Config = struct {
h: u16,
@ -59,7 +59,7 @@ pub fn init(allocator: std.mem.Allocator, opts: Options) std.mem.Allocator.Error
const name = "layer";
self.plane_ = .{
.window = self.window(),
.cache = self.cache_storage.cache(),
.cache = self.view.cache_storage.cache(),
.name_buf = undefined,
.name_len = name.len,
};