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

Method selection

core/textfield.go:874–879  ·  view source on GitHub ↗

selection returns the currently selected text

()

Source from the content-addressed store, hash-verified

872
873// selection returns the currently selected text
874func (tf *TextField) selection() string {
875 if tf.hasSelection() {
876 return string(tf.editText[tf.selectStart:tf.selectEnd])
877 }
878 return ""
879}
880
881// selectModeToggle toggles the SelectMode, updating selection with cursor movement
882func (tf *TextField) selectModeToggle() {

Callers 1

deleteSelectionMethod · 0.95

Calls 1

hasSelectionMethod · 0.95

Tested by

no test coverage detected