Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Cancelling & repeating a surround action moves the cursor to the beginning of the line

Open max-sixty opened this issue 6 years ago • 6 comments

Describe the bug Cancelling a surround action and then restarting it causes the cursor to go to the beginning of the line.

To Reproduce Steps to reproduce the behavior:

  1. Ensure vim-surround is enabled
  2. Move the cursor somewhere mid-line
  3. Type y s esc, (as though you were going to type y s w ( and changed your mind)
  4. Type y s and the cursor moves to the beginning of the line

Expected behavior The behavior in (4) wouldn't be changed by the actions in (3), given (3) ended in an escape NB: Hitting esc multiple times doesn't change from a single esc

Environment (please complete the following information):

  • Extension Version: 1.13.1
  • OS Version: Darwin x64 19.3.0
  • VSCode version: 1.43.2

Thanks again for such a great tool!

max-sixty avatar Mar 29 '20 23:03 max-sixty

Confirmed. Strange bug; I'll try to track it down before the next release.

J-Fields avatar Mar 30 '20 14:03 J-Fields

Thanks @J-Fields !

BTW you should add a "Sponsor" option, given the amount of work you do solo and how many people use the tool...

max-sixty avatar Mar 30 '20 15:03 max-sixty

I appreciate the sentiment, but frankly the bulk of the work was done before I ever got involved, and if anyone's going to make a donation, their local food pantry or homeless shelter needs the money a lot more right now than I ever could.

J-Fields avatar Mar 30 '20 16:03 J-Fields

Fixed in #4780. @J-Fields I hope you don't mind me jumping on this issue, it was easy for me to pinpoint the problem after working on #4778, so I thought I'd just do it.

gergelyth avatar May 02 '20 10:05 gergelyth

@gergelyth not at all, it's appreciated!

J-Fields avatar May 02 '20 19:05 J-Fields

Thanks @gergelyth !

max-sixty avatar May 02 '20 20:05 max-sixty