startCursor starts the cursor blinking and renders it
()
| 43 | |
| 44 | // startCursor starts the cursor blinking and renders it |
| 45 | func (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 |
| 62 | func (ed *Editor) clearCursor() { |
no test coverage detected