MCPcopy
hub / github.com/micro-editor/micro / NewEventHandler

Function NewEventHandler

internal/buffer/eventhandler.go:154–161  ·  view source on GitHub ↗

NewEventHandler returns a new EventHandler

(buf *SharedBuffer, cursors []*Cursor)

Source from the content-addressed store, hash-verified

152
153// NewEventHandler returns a new EventHandler
154func NewEventHandler(buf *SharedBuffer, cursors []*Cursor) *EventHandler {
155 eh := new(EventHandler)
156 eh.UndoStack = new(TEStack)
157 eh.RedoStack = new(TEStack)
158 eh.buf = buf
159 eh.cursors = cursors
160 return eh
161}
162
163// ApplyDiff takes a string and runs the necessary insertion and deletion events to make
164// the buffer equal to that string

Callers 1

NewBufferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected