targets.vim
targets.vim copied to clipboard
Last selection seems been changed by targets.vim
- Select some text
- Move a round, trigger any text-object of targets.vim, e.g.
ya"
- Type
gv
will select the text-object in step 2. If use original vim text-object, thatgv
should select the selection in step 1.
@wodesuck: Thank you, I never noticed, but of course you're right, I can reproduce the behavior you describe.
I tried a few other text object plugins I use, and they all seem to have the same issue. I wonder if this should ideally be fixed inside of Vim/Neovim. Because a text object plugin like this one does need to internally visually select the target for the operator to operate on. Not sure if this should overwrite the last visual selection as it does here. I'm not even sure a plugin like targets.vim can currently restore the last visual selection to fix this issue.