Deselect closes the cursor's current selection Start indicates whether the cursor should be placed at the start or end of the selection
(start bool)
| 189 | // Start indicates whether the cursor should be placed |
| 190 | // at the start or end of the selection |
| 191 | func (c *Cursor) Deselect(start bool) { |
| 192 | if c.HasSelection() { |
| 193 | if start { |
| 194 | c.Loc = c.CurSelection[0] |
| 195 | } else { |
| 196 | c.Loc = c.CurSelection[1] |
| 197 | } |
| 198 | c.ResetSelection() |
| 199 | c.StoreVisualX() |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | // GetSelection returns the cursor's selection |
| 204 | func (c *Cursor) GetSelection() []byte { |
no test coverage detected