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

Method SelectTo

internal/buffer/cursor.go:401–409  ·  view source on GitHub ↗

SelectTo selects from the current cursor location to the given location

(loc Loc)

Source from the content-addressed store, hash-verified

399// SelectTo selects from the current cursor location to the given
400// location
401func (c *Cursor) SelectTo(loc Loc) {
402 if loc.GreaterThan(c.OrigSelection[0]) {
403 c.SetSelectionStart(c.OrigSelection[0])
404 c.SetSelectionEnd(loc)
405 } else {
406 c.SetSelectionStart(loc)
407 c.SetSelectionEnd(c.OrigSelection[0])
408 }
409}
410
411// WordRight moves the cursor one word to the right
412func (c *Cursor) WordRight() {

Callers 15

MouseDragMethod · 0.80
SelectUpMethod · 0.80
SelectDownMethod · 0.80
SelectLeftMethod · 0.80
SelectRightMethod · 0.80
SelectWordRightMethod · 0.80
SelectWordLeftMethod · 0.80
SelectSubWordRightMethod · 0.80
SelectSubWordLeftMethod · 0.80
SelectToStartOfTextMethod · 0.80
SelectToStartOfLineMethod · 0.80

Calls 3

SetSelectionStartMethod · 0.95
SetSelectionEndMethod · 0.95
GreaterThanMethod · 0.45

Tested by

no test coverage detected