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

Method UpdateCursors

internal/buffer/buffer.go:1101–1107  ·  view source on GitHub ↗

UpdateCursors updates all the cursors indices

()

Source from the content-addressed store, hash-verified

1099
1100// UpdateCursors updates all the cursors indices
1101func (b *Buffer) UpdateCursors() {
1102 b.EventHandler.cursors = b.cursors
1103 b.EventHandler.active = b.curCursor
1104 for i, c := range b.cursors {
1105 c.Num = i
1106 }
1107}
1108
1109func (b *Buffer) RemoveCursor(i int) {
1110 copy(b.cursors[i:], b.cursors[i+1:])

Callers 4

AddCursorMethod · 0.95
RemoveCursorMethod · 0.95
ClearCursorsMethod · 0.95
RemoveMultiCursorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected