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

[rename on type] strange behavior with auto indent in closing tag #93006

Open
IllusionMH opened this issue Mar 19, 2020 · 1 comment
Open

[rename on type] strange behavior with auto indent in closing tag #93006

IllusionMH opened this issue Mar 19, 2020 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-synced-region Issues related to synced region functionality in editor
Milestone

Comments

@IllusionMH
Copy link
Contributor

Issue Type: Bug

Ref #88424

Set "editor.autoIndent": "full" (default) and "editor.renameOnType": true

Code for test

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title>
</head>
<body>
    <span>
        content
    </span> <!-- is initial cursor position is between `span` and `>`-->
</body>
</html>
  1. Set cursor to the end of span inside of closing tag
  2. Use Backspace to remove span
    Open and closed tags are <> and </> respectively
  3. Start to typing div
    1. After typing d open tag is still <>, closed tag is moved to the start of the line and has </d>
    2. After typing iv it would be <iv> and </div>

Setting "editor.autoIndent": "advanced" doesn't have this problem.

Looks like wrong indent for closing tag might be related to #32871 but looks strange that d is lost in opening tag but other characters added after that.

/cc @octref

VS Code version: Code - Insiders 1.44.0-insider (c0eea2a, 2020-03-19T09:27:54.357Z)
OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.72GB (18.08GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none
@octref octref added bug Issue identified by VS Code Team member as probable bug editor-synced-region Issues related to synced region functionality in editor labels Mar 19, 2020
@octref octref added this to the March 2020 milestone Mar 19, 2020
@octref
Copy link
Contributor

octref commented Mar 19, 2020

Good catch.

@octref octref modified the milestones: March 2020, April 2020 Apr 2, 2020
@aeschli aeschli modified the milestones: April 2020, May 2020 May 4, 2020
@aeschli aeschli changed the title Rename on type has strange behavior with auto indent in closing tag [rename on type] strange behavior with auto indent in closing tag May 4, 2020
@aeschli aeschli assigned aeschli and unassigned octref May 4, 2020
@aeschli aeschli modified the milestones: May 2020, June 2020 Jun 4, 2020
@aeschli aeschli modified the milestones: June 2020, On Deck Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug editor-synced-region Issues related to synced region functionality in editor
Projects
None yet
Development

No branches or pull requests

3 participants