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

Method Insert

internal/buffer/buffer.go:559–565  ·  view source on GitHub ↗

Insert inserts the given string of text at the start location

(start Loc, text string)

Source from the content-addressed store, hash-verified

557
558// Insert inserts the given string of text at the start location
559func (b *Buffer) Insert(start Loc, text string) {
560 if !b.Type.Readonly {
561 b.EventHandler.cursors = b.cursors
562 b.EventHandler.active = b.curCursor
563 b.EventHandler.Insert(start, text)
564 }
565}
566
567// Remove removes the characters between the start and end locations
568func (b *Buffer) Remove(start, end Loc) {

Callers 15

MoveLinesUpMethod · 0.95
MoveLinesDownMethod · 0.95
DoRuneInsertMethod · 0.45
InsertNewlineMethod · 0.45
IndentSelectionMethod · 0.45
IndentLineMethod · 0.45
InsertTabMethod · 0.45
DuplicateMethod · 0.45
DuplicateLineMethod · 0.45
pasteMethod · 0.45
HandleEventMethod · 0.45
TextFilterCmdMethod · 0.45

Calls

no outgoing calls

Tested by 2

checkFunction · 0.36
benchEditFunction · 0.36