1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Fix more bugs

This commit is contained in:
mcrakhman 2022-11-25 11:40:36 +01:00 committed by Mikhail Iudin
parent f5a2a7a959
commit 0f6122c09b
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
5 changed files with 22 additions and 5 deletions

View file

@ -12,6 +12,7 @@ import (
type TextDocument interface {
tree.ObjectTree
InnerTree() tree.ObjectTree
AddText(text string) error
Text() (string, error)
TreeDump() string
@ -55,6 +56,10 @@ func NewTextDocument(ctx context.Context, space commonspace.Space, id string, li
}, nil
}
func (t *textDocument) InnerTree() tree.ObjectTree {
return t.ObjectTree
}
func (t *textDocument) AddText(text string) (err error) {
content := &testchanges.TextContent_TextAppend{
TextAppend: &testchanges.TextAppend{Text: text},