public void StorageQualities(Buffer buffer) { SValue value = storage.Set(buffer.FullPath).With("cursor", SValue.NewInt(buffer.Controller.Lines.LastSelection.caret)); if (!buffer.settedEncodingPair.IsNull) { value.With("encoding", SValue.NewString(buffer.settedEncodingPair.ToString())); } else { value.With("encoding", SValue.None); } if (!string.IsNullOrEmpty(buffer.customSyntax)) { value.With("syntax", SValue.NewString(buffer.customSyntax.ToString())); } else { value.With("syntax", SValue.None); } if (buffer.Controller.bookmarks.Count > 0) { value.With("bm", SValue.NewBytes(EncodeBookmarks(buffer.Controller))); } }