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

Created on 30 Mar 2020  路  6Comments  路  Source: VSCodeVim/Vim

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!

kinbug

All 6 comments

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

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

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.

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 not at all, it's appreciated!

Thanks @gergelyth !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

typeoneerror picture typeoneerror  路  3Comments

edwintorok picture edwintorok  路  3Comments

Jimmy-Z picture Jimmy-Z  路  3Comments

WangRongda picture WangRongda  路  3Comments

gerardmrk picture gerardmrk  路  3Comments