feat(buffers): save/restore full editor state on buffer switch

This commit is contained in:
CJ van den Berg 2025-01-29 22:10:54 +01:00
parent b45b5910ee
commit e6e0301a78
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 51 additions and 17 deletions

View file

@ -65,6 +65,7 @@ pub fn delete_buffer(self: *Self, file_path: []const u8) bool {
pub fn retire(_: *Self, buffer: *Buffer, meta: ?[]const u8) void {
if (meta) |buf| buffer.set_meta(buf) catch {};
tp.trace(tp.channel.debug, .{ "buffer", "retire", buffer.file_path, "hidden", buffer.hidden, "ephemeral", buffer.ephemeral });
if (meta) |buf| tp.trace(tp.channel.debug, tp.message{ .buf = buf });
}
pub fn close_buffer(self: *Self, buffer: *Buffer) void {