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

Method HasSelection

internal/buffer/cursor.go:171–173  ·  view source on GitHub ↗

HasSelection returns whether or not the user has selected anything

()

Source from the content-addressed store, hash-verified

169
170// HasSelection returns whether or not the user has selected anything
171func (c *Cursor) HasSelection() bool {
172 return c.CurSelection[0] != c.CurSelection[1]
173}
174
175// DeleteSelection deletes the currently selected text
176func (c *Cursor) DeleteSelection() {

Callers 15

CopySelectionMethod · 0.95
DeleteSelectionMethod · 0.95
DeselectMethod · 0.95
displayBufferMethod · 0.45
displayBufferMethod · 0.45
HandleEventMethod · 0.45
DoRuneInsertMethod · 0.45
MouseReleaseMethod · 0.45
CursorDownMethod · 0.45
CursorLeftMethod · 0.45
CursorRightMethod · 0.45
SelectUpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected