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

Method Replace

internal/buffer/eventhandler.go:232–235  ·  view source on GitHub ↗

Replace deletes from start to end and replaces it with the given string

(start, end Loc, replace string)

Source from the content-addressed store, hash-verified

230
231// Replace deletes from start to end and replaces it with the given string
232func (eh *EventHandler) Replace(start, end Loc, replace string) {
233 eh.Remove(start, end)
234 eh.Insert(start, replace)
235}
236
237// Execute a textevent and add it to the undo stack
238func (eh *EventHandler) Execute(t *TextEvent) {

Callers 8

DoRuneInsertMethod · 0.80
CycleAutocompleteMethod · 0.80
DonePromptMethod · 0.80
UpHistoryMethod · 0.80
DownHistoryMethod · 0.80
searchHistoryMethod · 0.80
ReplaceHomeFunction · 0.80
generateFileFunction · 0.80

Calls 2

RemoveMethod · 0.95
InsertMethod · 0.95

Tested by

no test coverage detected