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

Method Move

internal/buffer/loc.go:134–136  ·  view source on GitHub ↗

Move moves a loc n characters

(n int, buf *Buffer)

Source from the content-addressed store, hash-verified

132
133// Move moves a loc n characters
134func (l Loc) Move(n int, buf *Buffer) Loc {
135 return l.MoveLA(n, buf.LineArray)
136}
137
138// ByteOffset is just like ToCharPos except it counts bytes instead of runes
139func ByteOffset(pos Loc, buf *Buffer) int {

Callers 15

displayBufferMethod · 0.80
BackspaceMethod · 0.80
DeleteMethod · 0.80
IndentSelectionMethod · 0.80
OutdentSelectionMethod · 0.80
FindNextMethod · 0.80
FindPreviousMethod · 0.80
selectLinesMethod · 0.80
DuplicateLineMethod · 0.80
JumpToMatchingBraceMethod · 0.80
ReplaceCmdMethod · 0.80
findAllMethod · 0.80

Calls 1

MoveLAMethod · 0.95

Tested by

no test coverage detected