- v.Cursor.curSelection[0] = charPos + match[0]
- v.Cursor.curSelection[1] = charPos + match[1]
- v.Cursor.x, v.Cursor.y = FromCharPos(charPos+match[1]-1, v.Buf)
+ v.Cursor.SetSelectionStart(FromCharPos(charPos+runePos(match[0], str), v.Buf))
+ v.Cursor.SetSelectionEnd(FromCharPos(charPos+runePos(match[1], str), v.Buf))
+ v.Cursor.Loc = v.Cursor.CurSelection[1]