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

Renaming C# entities using F2 shortcut opens a duplicate tab #98005

Closed
ghost opened this issue May 16, 2020 · 6 comments
Closed

Renaming C# entities using F2 shortcut opens a duplicate tab #98005

ghost opened this issue May 16, 2020 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@ghost
Copy link

ghost commented May 16, 2020

Issue Type: Bug


Steps to reproduce

  1. Open a C# class in a .cs file.
  2. Place cursor over the name of a class, method, or variable.
  3. Press F2 to bring up the auto-rename prompt.
  4. Type a different name in the auto-rename prompt and press enter.

Actual Result

A duplicate .cs file is opened in Visual Studio Code with the new name. The original tab remains but does not reflect the naming changes.

Expected Result

No duplicate tab is created. The original tab reflects the naming changes.


VS Code version: Code 1.45.1 (5763d90, 2020-05-14T08:33:47.663Z)
OS version: Darwin x64 19.4.0

System Info
Item Value
CPUs Intel(R) Core(TM) i5-1030NG7 CPU @ 1.10GHz (8 x 1100)
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: unavailable_off
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) 2, 2, 2
Memory (System) 16.00GB (3.41GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (6)
Extension Author (truncated) Version
csharp ms- 1.21.18
remote-containers ms- 0.117.1
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
remote-wsl ms- 0.44.2
vscode-remote-extensionpack ms- 0.20.0
@ghost
Copy link
Author

ghost commented May 16, 2020

Update

It appears the issue is not exclusive to the F2 rename functionality. It is also happening with the Generate Method helper, accessible through CMD + . (CTRL + . in Windows).

@alexdima
Copy link
Member

This appears to be a problem caused by the C# extension, perhaps they don't give good workspace edits.

@jrieken
Copy link
Member

jrieken commented May 18, 2020

/extc#

@jrieken
Copy link
Member

jrieken commented May 18, 2020

fyi @bpasero for the epic that discusses casing

@bpasero
Copy link
Member

bpasero commented May 18, 2020

/duplicate #12448

@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants
@bpasero @jrieken @alexdima and others