CursorBack deletes the character at left of the cursor if possible
()
| 148 | |
| 149 | // CursorBack deletes the character at left of the cursor if possible |
| 150 | func (ed *Edit) CursorBack() { |
| 151 | |
| 152 | if ed.col > 0 { |
| 153 | ed.col-- |
| 154 | ed.text = text.StrRemove(ed.text, ed.col) |
| 155 | ed.redraw(ed.focus) |
| 156 | ed.Dispatch(OnChange, nil) |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | // CursorHome moves the edit cursor to the beginning of the text |
| 161 | func (ed *Edit) CursorHome() { |