feat: persist syntax_no_render in editor state

This commit is contained in:
CJ van den Berg 2025-07-31 09:49:17 +02:00
parent 666d30df3b
commit 9793bcdd9a
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -372,7 +372,7 @@ pub const Editor = struct {
const Result = command.Result;
pub fn write_state(self: *const Self, writer: Buffer.MetaWriter) !void {
try cbor.writeArrayHeader(writer, 11);
try cbor.writeArrayHeader(writer, 12);
try cbor.writeValue(writer, self.file_path orelse "");
try cbor.writeValue(writer, self.clipboard orelse "");
try cbor.writeValue(writer, self.last_find_query orelse "");
@ -381,6 +381,7 @@ pub const Editor = struct {
try cbor.writeValue(writer, self.indent_size);
try cbor.writeValue(writer, self.tab_width);
try cbor.writeValue(writer, self.indent_mode);
try cbor.writeValue(writer, self.syntax_no_render);
if (self.find_history) |history| {
try cbor.writeArrayHeader(writer, history.items.len);
for (history.items) |item|
@ -419,6 +420,7 @@ pub const Editor = struct {
tp.extract(&self.indent_size),
tp.extract(&self.tab_width),
tp.extract(&self.indent_mode),
tp.extract(&self.syntax_no_render),
tp.extract_cbor(&find_history),
tp.extract_cbor(&view_cbor),
tp.extract_cbor(&cursels_cbor),