antonk52 / markdowny.nvim

Markdown like keymaps for toggling text formatting
73 stars 7 forks source link

Added ability to re-select a modified region using the 'gv' and V-LINE support #3

Closed ful1e5 closed 1 year ago

ful1e5 commented 1 year ago

This patch utilizes the '>' symbol to obtain the end column position of a selection. This capability enables the updating of positions in visual selections after adding or removing a surround, thus facilitating the reselection of the region using the gv command.

Before

https://user-images.githubusercontent.com/24286590/213634087-0c777627-5e49-41e2-b76e-b66a099268dd.mp4

After

https://user-images.githubusercontent.com/24286590/213634116-852dd159-1276-4254-a4b6-4b60451e4736.mp4

[Update]

The commit c141afd96ed66e751b94379ccb1a7941607800ae addresses an issue in the original code where the surround in the V-LINE selection was not correctly positioned. It also fixes an error that was introduced when using the gv command for re-selecting the surround that was added in V-LINE.

antonk52 commented 1 year ago

Nice work addressing both bugs 👍

Thanks!