kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
3.16k stars 63 forks source link

Running action such as `dsq` changes last visual selection marks #154

Closed smjonas closed 2 years ago

smjonas commented 2 years ago

Checklist

To reproduce

  1. Select a range of text in a buffer: image

  2. Now run a nvim-surround command, e.g. dsq

  3. Run gv to reselect the last visually selected lines.

Expected behavior

The lines selected in step 1 should be visually selected.

Actual behavior

The position from the first quote to the last one (here: "packer.nvim") is selected.

Additional context

This behavior causes some issues with a plugin of mine so it would be great if the '< and '> marks were restored after a command is run. I'll try to make a PR :)

kylechui commented 2 years ago

Apologies for being inactive these last few weeks; school + life is one hell of a combo. I'll try to make time to review your PRs sometime this upcoming week.

smjonas commented 2 years ago

Thanks for taking the time to merge this!

kylechui commented 2 years ago

Thanks for taking the time to write the PR! It really helps out a lot, even if it's small. :sparkling_heart: