feat: save and restore enable_auto_save in editor state
This commit is contained in:
parent
c5fe992f75
commit
35e36089a8
1 changed files with 3 additions and 1 deletions
|
@ -368,11 +368,12 @@ pub const Editor = struct {
|
|||
const Result = command.Result;
|
||||
|
||||
pub fn write_state(self: *const Self, writer: Buffer.MetaWriter) !void {
|
||||
try cbor.writeArrayHeader(writer, 7);
|
||||
try cbor.writeArrayHeader(writer, 8);
|
||||
try cbor.writeValue(writer, self.file_path orelse "");
|
||||
try cbor.writeValue(writer, self.clipboard orelse "");
|
||||
try cbor.writeValue(writer, self.last_find_query orelse "");
|
||||
try cbor.writeValue(writer, self.enable_format_on_save);
|
||||
try cbor.writeValue(writer, self.enable_auto_save);
|
||||
if (self.find_history) |history| {
|
||||
try cbor.writeArrayHeader(writer, history.items.len);
|
||||
for (history.items) |item|
|
||||
|
@ -406,6 +407,7 @@ pub const Editor = struct {
|
|||
tp.extract(&clipboard),
|
||||
tp.extract(&last_find_query),
|
||||
tp.extract(&self.enable_format_on_save),
|
||||
tp.extract(&self.enable_auto_save),
|
||||
tp.extract_cbor(&find_history),
|
||||
tp.extract_cbor(&view_cbor),
|
||||
tp.extract_cbor(&cursels_cbor),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue