MCPcopy Create free account
hub / github.com/cogentcore/core / HasSelection

Method HasSelection

texteditor/select.go:56–58  ·  view source on GitHub ↗

HasSelection returns whether there is a selected region of text

()

Source from the content-addressed store, hash-verified

54
55// HasSelection returns whether there is a selected region of text
56func (ed *Editor) HasSelection() bool {
57 return ed.SelectRegion.Start.IsLess(ed.SelectRegion.End)
58}
59
60// Selection returns the currently selected text as a text.Edit, which
61// captures start, end, and full lines in between -- nil if no selection

Callers 15

QReplacePromptMethod · 0.95
escPressedMethod · 0.95
LookupMethod · 0.95
cursorBackspaceMethod · 0.95
cursorDeleteMethod · 0.95
cursorBackspaceWordMethod · 0.95
cursorDeleteWordMethod · 0.95
renderSelectMethod · 0.95
setCursorFromMouseMethod · 0.95
ShowContextMenuMethod · 0.95
contextMenuMethod · 0.95
SelectionMethod · 0.95

Calls 1

IsLessMethod · 0.80

Tested by

no test coverage detected