Slightly improve performance for very long lines
@@ -74,9 +74,6 @@ func (c *Cursor) GetVisualX() int {
bytes := c.buf.LineBytes(c.Y)
tabsize := int(c.buf.Settings["tabsize"].(float64))
- if c.X > util.CharacterCount(bytes) {
- c.X = util.CharacterCount(bytes) - 1
- }
return util.StringWidth(bytes, c.X, tabsize)
}
