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

Method AddCursor

internal/buffer/buffer.go:1038–1043  ·  view source on GitHub ↗

AddCursor adds a new cursor to the list

(c *Cursor)

Source from the content-addressed store, hash-verified

1036
1037// AddCursor adds a new cursor to the list
1038func (b *Buffer) AddCursor(c *Cursor) {
1039 b.cursors = append(b.cursors, c)
1040 b.EventHandler.cursors = b.cursors
1041 b.EventHandler.active = b.curCursor
1042 b.UpdateCursors()
1043}
1044
1045// SetCurCursor sets the current cursor
1046func (b *Buffer) SetCurCursor(n int) {

Callers 8

SpawnMultiCursorMethod · 0.80
SpawnCursorAtLocMethod · 0.80
SpawnMultiCursorUpNMethod · 0.80
MouseMultiCursorMethod · 0.80
checkFunction · 0.80
benchEditFunction · 0.80
NewBufferFunction · 0.80

Calls 1

UpdateCursorsMethod · 0.95

Tested by 2

checkFunction · 0.64
benchEditFunction · 0.64