StartOfText moves the cursor to the first non-whitespace rune of the line it is on
()
| 113 | // StartOfText moves the cursor to the first non-whitespace rune of |
| 114 | // the line it is on |
| 115 | func (c *Cursor) StartOfText() { |
| 116 | c.Start() |
| 117 | for util.IsWhitespace(c.RuneUnder(c.X)) { |
| 118 | if c.X == util.CharacterCount(c.buf.LineBytes(c.Y)) { |
| 119 | break |
| 120 | } |
| 121 | c.Right() |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // IsStartOfText returns whether the cursor is at the first |
| 126 | // non-whitespace rune of the line it is on |
nothing calls this directly
no test coverage detected