Hi,
In a plugin on mine, I have the following lines:
let col = virtcol(".")
let line = strpart(getline("."), col - 1)
The idea is to get the line right of the cursor including the character
under the cursor. This works fine for latin1 encoding but yields wrong
results when the encoding is eg utf8 and if there is a 16bit character
before the cursor -- the string in front of the cursor then obviously is
longer than one would expect from the value of virtcol().
Do you have a suggestion on how to robustly extract the line right of
the cursor?
Regards,
Thomas.