refactor: move Layer.cache_storage to Layer.View.cache_storage
This commit is contained in:
parent
b6b1f02565
commit
19569fc18c
1 changed files with 2 additions and 2 deletions
|
|
@ -10,11 +10,11 @@ view: View,
|
||||||
y_off: i32 = 0,
|
y_off: i32 = 0,
|
||||||
x_off: i32 = 0,
|
x_off: i32 = 0,
|
||||||
plane_: Plane,
|
plane_: Plane,
|
||||||
cache_storage: GraphemeCache.Storage = .{},
|
|
||||||
|
|
||||||
const View = struct {
|
const View = struct {
|
||||||
allocator: std.mem.Allocator,
|
allocator: std.mem.Allocator,
|
||||||
screen: vaxis.Screen,
|
screen: vaxis.Screen,
|
||||||
|
cache_storage: GraphemeCache.Storage = .{},
|
||||||
|
|
||||||
pub const Config = struct {
|
pub const Config = struct {
|
||||||
h: u16,
|
h: u16,
|
||||||
|
|
@ -59,7 +59,7 @@ pub fn init(allocator: std.mem.Allocator, opts: Options) std.mem.Allocator.Error
|
||||||
const name = "layer";
|
const name = "layer";
|
||||||
self.plane_ = .{
|
self.plane_ = .{
|
||||||
.window = self.window(),
|
.window = self.window(),
|
||||||
.cache = self.cache_storage.cache(),
|
.cache = self.view.cache_storage.cache(),
|
||||||
.name_buf = undefined,
|
.name_buf = undefined,
|
||||||
.name_len = name.len,
|
.name_len = name.len,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue