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

Method RemoveCursor

internal/buffer/buffer.go:1109–1115  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

1107}
1108
1109func (b *Buffer) RemoveCursor(i int) {
1110 copy(b.cursors[i:], b.cursors[i+1:])
1111 b.cursors[len(b.cursors)-1] = nil
1112 b.cursors = b.cursors[:len(b.cursors)-1]
1113 b.curCursor = util.Clamp(b.curCursor, 0, len(b.cursors)-1)
1114 b.UpdateCursors()
1115}
1116
1117// ClearCursors removes all extra cursors
1118func (b *Buffer) ClearCursors() {

Callers 2

MouseMultiCursorMethod · 0.80
RemoveMultiCursorMethod · 0.80

Calls 2

UpdateCursorsMethod · 0.95
ClampFunction · 0.92

Tested by

no test coverage detected