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

Method SelectLine

internal/buffer/cursor.go:215–226  ·  view source on GitHub ↗

SelectLine selects the current line

()

Source from the content-addressed store, hash-verified

213
214// SelectLine selects the current line
215func (c *Cursor) SelectLine() {
216 c.Start()
217 c.SetSelectionStart(c.Loc)
218 c.End()
219 if len(c.buf.lines)-1 > c.Y {
220 c.SetSelectionEnd(c.Loc.Move(1, c.buf))
221 } else {
222 c.SetSelectionEnd(c.Loc)
223 }
224
225 c.OrigSelection = c.CurSelection
226}
227
228// AddLineToSelection adds the current line to the selection
229func (c *Cursor) AddLineToSelection() {

Callers

nothing calls this directly

Calls 5

StartMethod · 0.95
SetSelectionStartMethod · 0.95
EndMethod · 0.95
SetSelectionEndMethod · 0.95
MoveMethod · 0.80

Tested by

no test coverage detected