In one of my vim scripts I require the column of the last non-whitespace character of the current line and the column of the last character of the current line (when the current line is wrapped into two or more lines) I would like to get the column of the last character on the same visual line.
How could I acquire these columns?
Example:
thisis[o]nelonglineXXXXX
thisisstillthesameline
Cursor marked as: [ ]
Whitespace marked as: X
Expected result:
- Column of last e in first line
- Column of last X in first line