selectRegionUpdate updates current select region based on given cursor position relative to SelectStart position
(pos int)
| 905 | // selectRegionUpdate updates current select region based on given cursor position |
| 906 | // relative to SelectStart position |
| 907 | func (tf *TextField) selectRegionUpdate(pos int) { |
| 908 | if pos < tf.selectInit { |
| 909 | tf.selectStart = pos |
| 910 | tf.selectEnd = tf.selectInit |
| 911 | } else { |
| 912 | tf.selectStart = tf.selectInit |
| 913 | tf.selectEnd = pos |
| 914 | } |
| 915 | tf.selectUpdate() |
| 916 | } |
| 917 | |
| 918 | // selectAll selects all the text |
| 919 | func (tf *TextField) selectAll() { |
no test coverage detected