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

Function NewCursor

internal/buffer/cursor.go:48–57  ·  view source on GitHub ↗
(b *Buffer, l Loc)

Source from the content-addressed store, hash-verified

46}
47
48func NewCursor(b *Buffer, l Loc) *Cursor {
49 c := &Cursor{
50 buf: b,
51 Loc: l,
52
53 NewTrailingWsY: -1,
54 }
55 c.StoreVisualX()
56 return c
57}
58
59func (c *Cursor) SetBuf(b *Buffer) {
60 c.buf = b

Callers 8

SpawnMultiCursorMethod · 0.92
SpawnCursorAtLocMethod · 0.92
SpawnMultiCursorUpNMethod · 0.92
MouseMultiCursorMethod · 0.92
checkFunction · 0.85
benchEditFunction · 0.85
NewBufferFunction · 0.85

Calls 1

StoreVisualXMethod · 0.95

Tested by 2

checkFunction · 0.68
benchEditFunction · 0.68