Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html] Mirror cursor devolves into multi-cursor when undoing (ctrl-z) #87732

Closed
rlyczynski opened this issue Dec 26, 2019 · 4 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-synced-region Issues related to synced region functionality in editor html HTML support issues verified Verification succeeded
Milestone

Comments

@rlyczynski
Copy link

rlyczynski commented Dec 26, 2019

Issue Type: Bug

  1. Open html document and add a tag
    <div></div>
  2. Place cursor at the end of the open tag and add a space
    <div ></div>
  3. Undo (ctrl-z) once adds a space to close tag (unexpected, but probably an implementation detail of the space special case 🤷‍♂)
    <div ></div >
  4. Undo (ctrl-z) twice removes the space from the end of both tags
    <div></div>
  5. Add a space and start typing
    <div class="aClass"></div class="aClass">

Expected:
<div class="aClass"></div>

Basically, after the second undo, you're left with a normal multi-cursor. Even if you move the cursor around the document and keep typing the multi-cursor follows.

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

System Info
Item Value
CPUs Intel(R) Xeon(R) E-2176M CPU @ 2.70GHz (12 x 2712)
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) 31.74GB (16.78GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (11)
Extension Author (truncated) Version
ng-template Ang 0.900.3
xml Dot 2.5.0
json-tools eri 1.0.2
terraform mau 1.4.0
vscode-json5 mrm 1.0.0
remote-wsl ms- 0.41.6
csharp ms- 1.21.9
vs-keybindings ms- 0.2.0
debugger-for-chrome msj 4.12.3
vscode-icons vsc 9.6.0
better-align wwm 1.1.6
@kieferrm kieferrm added the bug Issue identified by VS Code Team member as probable bug label Dec 26, 2019
@octref octref added the html HTML support issues label Jan 8, 2020
@octref octref added this to the January 2020 milestone Jan 8, 2020
@octref
Copy link
Contributor

octref commented Jan 8, 2020

Good catch, although I'm wondering why you would use Cmd-Z instead of backspace in this case.

@rlyczynski
Copy link
Author

That's a fair question. I guess its just a habit I've built over time. I like to think that I undo my typos instead of deleting so that unwanted changes aren't left on the "undo stack", but honestly it's probably just a weird quirk that I do.

In fairness this is probably pretty small edge case but something I noticed and the resulting functionality seemed weird so I reported it.

@octref octref added the editor-synced-region Issues related to synced region functionality in editor label Jan 10, 2020
@octref
Copy link
Contributor

octref commented Jan 30, 2020

This will be fixable if we do #88424.

@octref
Copy link
Contributor

octref commented Mar 18, 2020

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)

@octref octref closed this as completed Mar 18, 2020
@octref octref modified the milestones: Backlog, March 2020 Mar 18, 2020
@gregvanl gregvanl added the verified Verification succeeded label Apr 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-synced-region Issues related to synced region functionality in editor html HTML support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants