when using emmet wrap with abbreviation, cursor is not shown in correct position
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
when in normal or visual mode, calling the emmet command "wrap with abbreviation" on a section of code will work, but the cursor is shown at the bottom of the new selection. When using movement commands like h,j,k,l, it becomes obvious that the cursor was where it originally was when the command was executed.
To Reproduce
Steps to reproduce the behavior:
- Select a few lines of html code with visual mode in a .html file
- enter command pallete with cmd + shift + p
- Type in 'wrap with abbreviation' and hit enter
- Type in "div" and hit enter to wrap your selection with a div
- Notice visually that your cursor is now at the bottom of the newly wrapped code
- Try to navigate using h,j,k,l, or arrow keys
- Notice the cursor hops to a different location within visual mode
Expected behavior
After code is wrapped, editor should correctly show where the cursor is located. editor should also exit visual mode
Screenshots

Environment (please complete the following information):
- Extension (VsCodeVim) version: 0.16.12
- VSCode version: 1.28.2
- OS: OSX 10.12.6
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in a .html file using visual mode and the “wrap with abbreviation” command from the command palette. Trace the command’s handling of the selection and cursor state, then verify with h, j, k, l or arrow-key movement that the cursor is displayed at its actual position and visual mode exits as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100