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

Method startCursor

texteditor/cursor.go:45–59  ·  view source on GitHub ↗

startCursor starts the cursor blinking and renders it

()

Source from the content-addressed store, hash-verified

43
44// startCursor starts the cursor blinking and renders it
45func (ed *Editor) startCursor() {
46 if ed == nil || ed.This == nil {
47 return
48 }
49 if !ed.IsVisible() {
50 return
51 }
52 ed.blinkOn = true
53 ed.renderCursor(true)
54 if core.SystemSettings.CursorBlinkTime == 0 {
55 return
56 }
57 editorBlinker.SetWidget(ed.This.(core.Widget))
58 editorBlinker.Blink(core.SystemSettings.CursorBlinkTime)
59}
60
61// clearCursor turns off cursor and stops it from blinking
62func (ed *Editor) clearCursor() {

Callers 1

RenderWidgetMethod · 0.95

Calls 4

renderCursorMethod · 0.95
SetWidgetMethod · 0.80
BlinkMethod · 0.80
IsVisibleMethod · 0.65

Tested by

no test coverage detected