targets.vim icon indicating copy to clipboard operation
targets.vim copied to clipboard

Last selection seems been changed by targets.vim

Open wodesuck opened this issue 7 years ago • 1 comments

  1. Select some text
  2. Move a round, trigger any text-object of targets.vim, e.g. ya"
  3. Type gv will select the text-object in step 2. If use original vim text-object, that gv should select the selection in step 1.

wodesuck avatar Jan 13 '18 14:01 wodesuck

@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.

wellle avatar Feb 18 '18 20:02 wellle