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:
parent
f5a2a7a959
commit
0f6122c09b
5 changed files with 22 additions and 5 deletions
|
@ -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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue