cursorStart moves the cursor to the start of the text, updating selection if select mode is active.
()
| 765 | // cursorStart moves the cursor to the start of the text, updating selection |
| 766 | // if select mode is active. |
| 767 | func (tf *TextField) cursorStart() { |
| 768 | tf.cursorPos = 0 |
| 769 | tf.startPos = 0 |
| 770 | tf.endPos = min(len(tf.editText), tf.startPos+tf.charWidth) |
| 771 | if tf.selectMode { |
| 772 | tf.selectRegionUpdate(tf.cursorPos) |
| 773 | } |
| 774 | tf.NeedsRender() |
| 775 | } |
| 776 | |
| 777 | // cursorEnd moves the cursor to the end of the text, updating selection |
| 778 | // if select mode is active. |
no test coverage detected