GetCharPosInLine gets the char position of a visual x y coordinate (this is necessary because tabs are 1 char but 4 visual spaces)
(b []byte, visualPos int)
| 100 | // coordinate (this is necessary because tabs are 1 char but |
| 101 | // 4 visual spaces) |
| 102 | func (c *Cursor) GetCharPosInLine(b []byte, visualPos int) int { |
| 103 | tabsize := int(c.buf.Settings["tabsize"].(float64)) |
| 104 | return util.GetCharPosInLine(b, visualPos, tabsize) |
| 105 | } |
| 106 | |
| 107 | // Start moves the cursor to the start of the line it is on |
| 108 | func (c *Cursor) Start() { |
no test coverage detected