validateCursor sets current cursor to a valid cursor position
()
| 25 | |
| 26 | // validateCursor sets current cursor to a valid cursor position |
| 27 | func (ed *Editor) validateCursor() { |
| 28 | if ed.Buffer != nil { |
| 29 | ed.CursorPos = ed.Buffer.ValidPos(ed.CursorPos) |
| 30 | } else { |
| 31 | ed.CursorPos = lexer.PosZero |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // wrappedLines returns the number of wrapped lines (spans) for given line number |
| 36 | func (ed *Editor) wrappedLines(ln int) int { |
no test coverage detected