Skip to content

[html] mirror cursor: pasting a full line will copy the full line twice #88072

Closed

Description

Issue Type: Bug

If I copy a full line with CTRL+C (my cursor range is empty.)
Then position my cursor on top of a starting tag, it will paste the line above the opening tag and the closing tag.

<div>
   <span>Something</span></div>

Copy a line like

HELLO

Position your cursor on the opening <div>

Press CTRL+V.

Actual Results

HELLO
<div>
HELLO
    <span>Something</span></div>

Expected Results

HELLO
<div>
    <span>Something</span></div>

VS Code version: Code 1.41.1 (26076a4, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.86GB (5.36GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (2)
Extension Author (truncated) Version
vscode-typescript-tslint-plugin ms- 1.2.3
vscode-input-sequence tom 0.2.0

Activity

  1. added
    bug
    editor-synced-region
    on Jan 10, 2020
  2. octref commented on Jan 10, 2020

    @octref
    Contributor

    This is the default behavior of multiple-cursor. The extra cursor is added because of html.mirrorCursorOnMatchingTag setting. You can disable it for now if you don't like it.

  3. octref commented on Mar 18, 2020

    @octref
    Contributor

    In tomorrow's insiders html.mirrorCursorOnMatchingTag is replaced with editor.renameOnType. The new implementation fixes this issue. You can find more details here: #88424 (comment)

  4. locked and limited conversation to collaborators on May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugeditor-synced-regionverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions