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

Method GotoLoc

internal/buffer/cursor.go:77–80  ·  view source on GitHub ↗

GotoLoc puts the cursor at the given cursor's location and gives the current cursor its selection too

(l Loc)

Source from the content-addressed store, hash-verified

75// GotoLoc puts the cursor at the given cursor's location and gives
76// the current cursor its selection too
77func (c *Cursor) GotoLoc(l Loc) {
78 c.X, c.Y = l.X, l.Y
79 c.StoreVisualX()
80}
81
82// GetVisualX returns the x value of the cursor in visual spaces
83func (c *Cursor) GetVisualX(wrap bool) int {

Callers 4

NewBufferFunction · 0.45
UpHistoryMethod · 0.45
DownHistoryMethod · 0.45
searchHistoryMethod · 0.45

Calls 1

StoreVisualXMethod · 0.95

Tested by

no test coverage detected