Closed gelguy closed 9 years ago
Thanks, I've made some changes to the plugin that should account for selection=exclusive
. I didn't try to place the selection setting to once per call, since it seems easy to miss a place. The plugin does a lot of saving and restoring of settings and there's really no noticeable performance hit from it.
Could you try the patch and see if it fixes your issue?
This works as expected now. Thank you!
The
ReplaceMotion
at https://github.com/AndrewRadev/sideways.vim/blob/master/autoload/sideways/util.vim#L92 does not take into account when&selection
is exclusive.Steps to reproduce: just
set selection=exclusive
, and try SidewaysRight.This is because
gov
is assuming the visual selection is inclusive. Selection should be set toinclusive
before doing ReplaceMotion:I'm not sure about the exact architecture of the plugin, and it should be possible to refactor the selection setting so it is only called once per
:SidewaysRight/Left
call.