VSCodeVim / VSCodeVim/Vim

Html mirror cursor also cause line-wise operation (e.g. `yy` `dd`) duplicated

Open
#4,423 1 comment 2 reactions 0 assignees View on GitHub

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
With the html mirror cursor feature, we will have a paired cursor on the paired tag when we move our cursor into one tag.

I found other issues #4402 reported this will cause visual mode error. And also if you use yy or Y to copy this line, it will be duplicated. Or when you use dd the line and the line below will both be deleted.

The html mirror cursor feature maybe should be treated differently from the plain multiple (two) cursors, it may cause many errors as two cursors, I think.

Does anybody know other strange behaviors with this feature?

To Reproduce

  1. Move the cursor to one html tag.
  2. Type yy and p or dd

Expected behavior
Only one line should be deleted or copied.

Environment (please complete the following information):

  • Extension (VsCodeVim) version:
  • VSCode version: 1.41.1
  • OS: Microsoft Windows [Version 10.0.18362.535]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VSCode with the HTML mirror cursor enabled, then try yy followed by p and dd as described. Trace the HTML mirror cursor and line-wise operation entry points; done means yy copies and dd deletes only one line, without duplicating or removing the line below.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.