SelectLine selects the current line
()
| 213 | |
| 214 | // SelectLine selects the current line |
| 215 | func (c *Cursor) SelectLine() { |
| 216 | c.Start() |
| 217 | c.SetSelectionStart(c.Loc) |
| 218 | c.End() |
| 219 | if len(c.buf.lines)-1 > c.Y { |
| 220 | c.SetSelectionEnd(c.Loc.Move(1, c.buf)) |
| 221 | } else { |
| 222 | c.SetSelectionEnd(c.Loc) |
| 223 | } |
| 224 | |
| 225 | c.OrigSelection = c.CurSelection |
| 226 | } |
| 227 | |
| 228 | // AddLineToSelection adds the current line to the selection |
| 229 | func (c *Cursor) AddLineToSelection() { |
nothing calls this directly
no test coverage detected