Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) AttachEditor(session Lengther, doc Document)
- func (a *Adapter) AttachFd(fd int)
- func (a *Adapter) AttachSocket(state *ot.Controller, conn Sender)
- func (a *Adapter) IsSuppressed() bool
- func (a *Adapter) OnChange(change *js.Object) bool
- func (a *Adapter) Recv(ops ot.Ops)
- func (a *Adapter) Send(rev int, hash string, ops ot.Ops)
- func (a *Adapter) Suppress(suppress bool)
- type Document
- type JSDocument
- type JSLine
- type JSLineArray
- type JSPosition
- type JSStartEnd
- type Lengther
- type Line
- type LineArray
- type Position
- type Range
- type ReconnectingSocketSender
- type Sender
- type SessionLengther
- type SocketSender
- type StartEnd
- Bugs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶
func NewAdapter() *Adapter
func (*Adapter) AttachEditor ¶
func (*Adapter) AttachSocket ¶
func (a *Adapter) AttachSocket(state *ot.Controller, conn Sender)
func (*Adapter) IsSuppressed ¶
type JSDocument ¶
type JSDocument struct {
// contains filtered or unexported fields
}
func NewJSDocument ¶
func NewJSDocument(doc *js.Object) JSDocument
func (JSDocument) GetAllLines ¶
func (j JSDocument) GetAllLines() LineArray
func (JSDocument) GetLines ¶
func (j JSDocument) GetLines(a, b int) LineArray
func (JSDocument) Insert ¶
func (j JSDocument) Insert(p Position, s string)
func (JSDocument) Remove ¶
func (j JSDocument) Remove(se StartEnd)
func (JSDocument) SetOnChange ¶
func (j JSDocument) SetOnChange(f func(ev *js.Object) bool)
type JSLineArray ¶
type JSLineArray struct {
// contains filtered or unexported fields
}
func (JSLineArray) Index ¶
func (j JSLineArray) Index(i int) Line
func (JSLineArray) Length ¶
func (j JSLineArray) Length() int
type JSPosition ¶
type JSPosition struct {
// contains filtered or unexported fields
}
func (JSPosition) Col ¶
func (j JSPosition) Col() int
func (JSPosition) JS ¶
func (j JSPosition) JS() *js.Object
func (JSPosition) Row ¶
func (j JSPosition) Row() int
func (JSPosition) Set ¶
func (j JSPosition) Set(row, col int)
type JSStartEnd ¶
type JSStartEnd struct {
// contains filtered or unexported fields
}
func (JSStartEnd) End ¶
func (j JSStartEnd) End() Position
func (JSStartEnd) JS ¶
func (j JSStartEnd) JS() *js.Object
func (JSStartEnd) Set ¶
func (j JSStartEnd) Set(start, end Position)
func (JSStartEnd) Start ¶
func (j JSStartEnd) Start() Position
type ReconnectingSocketSender ¶
type ReconnectingSocketSender struct {
// contains filtered or unexported fields
}
func (*ReconnectingSocketSender) Send ¶
func (r *ReconnectingSocketSender) Send(msg []byte)
type SessionLengther ¶
type SessionLengther struct {
// contains filtered or unexported fields
}
func NewSessionLengther ¶
func NewSessionLengther(session *js.Object) SessionLengther
func (SessionLengther) Length ¶
func (a SessionLengther) Length() int
type SocketSender ¶
type SocketSender struct {
// contains filtered or unexported fields
}
func NewSocketSender ¶
func NewSocketSender(conn *js.Object) SocketSender
func (SocketSender) Send ¶
func (s SocketSender) Send(msg []byte)
Notes ¶
Bugs ¶
end is bogus after delete when \n in text... Repro: abc\ndef<<<^H
Click to show internal directories.
Click to hide internal directories.