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

Method MultipleReplace

internal/buffer/eventhandler.go:221–229  ·  view source on GitHub ↗

MultipleReplace creates an multiple insertions executes them

(deltas []Delta)

Source from the content-addressed store, hash-verified

219
220// MultipleReplace creates an multiple insertions executes them
221func (eh *EventHandler) MultipleReplace(deltas []Delta) {
222 e := &TextEvent{
223 C: *eh.cursors[eh.active],
224 EventType: TextEventReplace,
225 Deltas: deltas,
226 Time: time.Now(),
227 }
228 eh.Execute(e)
229}
230
231// Replace deletes from start to end and replaces it with the given string
232func (eh *EventHandler) Replace(start, end Loc, replace string) {

Callers 1

ReplaceRegexMethod · 0.80

Calls 1

ExecuteMethod · 0.95

Tested by

no test coverage detected