Closed inkarkat closed 12 years ago
The standard solution to this problem (which I sloppily forgot) is to save and restore 'selection'
, like I've done with 'virtualedit'
in the same function. I'd be much obliged if you could provide an implementation that does that instead.
Since we're reselecting with gv
here, temporarily setting selection=inclusive
won't help. Vim will use the mark positions '<
and '>
, and the selection's end will have grown by one character, again requiring compensation through a move.
That approach only works when making and operating on a new selection; then you can indeed save yourself from those compensation movements.
Careful, you screwed up the permissions!
I fixed it for you, this time. :)
To reproduce:
Expected:
2010-10-11 i am here
Actual:2010-10-10 ii am here