-
Notifications
You must be signed in to change notification settings - Fork 30k
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 a file is not reflected in the editor when renaming twice to same name different case #161743
Comments
Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/ |
Ok, now it's changed when i use the insider build: It seems that some intersting things work wrong here. |
Can you try to run |
Hm yeah I think I see it too, the first rename works fine but then renaming back does not work, is that what you see? |
@lramos15 this is a funny one and indeed a regression from our work to always go through the editor resolver when resolving editors and not go through the Steps
Here is how it used to be
=> this works every time you rename, irrespective of going back and forward of the name Here is how it is today
Now I am actually not so sure how to fix this. I am a bit worried that updating the Maybe the resolver should not be so clever to do an early return? Why do we do this? |
Yeah maybe, I think it was to prevent creating too many inputs and calling unnecessary factories when things are not actually changing at all. I guess we could always remove the early return and see what breaks. |
At least for text file editors, there is caching so that we do not end up with an editor input each time, but I think the same issue already exists today: if you do not have a tab as active and the editor resolver is used to bring up that editor, we would delegate the decision whether to create an editor input or not to the provider and so its up to the provider imho to do the caching. vscode/src/vs/workbench/services/textfile/common/textEditorService.ts Lines 246 to 266 in 8b8767e
|
Sorry, got caught up in other work and missed this. Will attempt a fix early in debt week for the November release as it is too risky to go in this late |
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
Test.go
test.go
Is still
Test.go
, not the new nametest.go
. until reopen the file.But
test.go
rename toTest.go
is ok.Also
Foo.go
reanme totest.go
is ok.Just
Test.go
rename totest.go
is not ok.The text was updated successfully, but these errors were encountered: