Left moves the cursor left one cell (if possible) or to the previous line if it is at the beginning
()
| 286 | // Left moves the cursor left one cell (if possible) or to |
| 287 | // the previous line if it is at the beginning |
| 288 | func (c *Cursor) Left() { |
| 289 | if c.Loc == c.buf.Start() { |
| 290 | return |
| 291 | } |
| 292 | if c.X > 0 { |
| 293 | c.X-- |
| 294 | } else { |
| 295 | c.Up() |
| 296 | c.End() |
| 297 | } |
| 298 | c.StoreVisualX() |
| 299 | } |
| 300 | |
| 301 | // Right moves the cursor right one cell (if possible) or |
| 302 | // to the next line if it is at the end |
no test coverage detected