vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Wrong editor info

Open Rratic opened this issue 3 years ago • 12 comments

The color isn't right and the 1 file unsaved tag appears after I saved all files. Refresh or close-reopen can't fix it.

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.70.0
  • OS Version: Windows 10.0.19044.1826

Steps to Reproduce:

I don't know, it's probably due to a set of coincidences. But you can ask me what appears when doing something.

Rratic avatar Aug 10 '22 05:08 Rratic

That indicates there is still a document that is dirty even though it should be visible. If you run "Log Working Copies" from the command palette and open developer tools console, it should print the URL of the document, can you share it?

Ideally you could also provide steps for me how to reproduce.

bpasero avatar Aug 10 '22 06:08 bpasero

@bpasero

INFO 
[Working Copies]
file:///d:/RM/docs/advanced/function.md (typeId: <no typeId>)
● file:///d:/RM/docs/advanced/function.md (typeId: <no typeId>)

[Backups]
<none>

you mean this? It's the same as the one I opened.

Rratic avatar Aug 10 '22 07:08 Rratic

Yeah thanks! So this indicates you or an extension made changes to function.md but somehow no editor opens to show this file. When you reload the window, does this editor then open as dirty?

Do you recall how you got into this?

bpasero avatar Aug 10 '22 07:08 bpasero

When you reload the window, does this editor then open as dirty?

What exactly does it mean, "as dirty"? By the way, I was still working on it so I enabled an extension, and closing the file crashes it.

Do you recall how you got into this?

I was editing various markdown files, and suddenly I found this strange thing, so not much information here.

Rratic avatar Aug 10 '22 07:08 Rratic

Something in console after the extension crashed:

workbench.desktop.main.js:sourcemap:810 Julia Extension: Please contact us! Your extension just crashed with a bug that we have been trying to replicate for a long time. You could help the development team a lot by contacting us at https://github.com/julia-vscode/julia-vscode so that we can work together to fix this issue.

Rratic avatar Aug 10 '22 07:08 Rratic

What I was trying to say is, when you restart VSCode, does it show the file function.md like this with a black dot:

image

bpasero avatar Aug 10 '22 07:08 bpasero

What I was trying to say is, when you restart VSCode, does it show the file function.md like this with a black dot:

nope, it's very plain

Rratic avatar Aug 10 '22 07:08 Rratic

to clarify: you restart vscode and you still see "1 unsaved" in the interface but no editor opens? does it reproduce if you run code --disable-extensions?

bpasero avatar Aug 10 '22 07:08 bpasero

actually, when i run code --disable-extensions, it shows "2 unsaved" with a black dot, i clicked save and it's fine yellow, but it still says "1 unsaved"

Rratic avatar Aug 10 '22 08:08 Rratic

Hm, when you open d:/RM/docs/advanced/function.md and then close it and either save or dont save, does this go away?

bpasero avatar Aug 10 '22 08:08 bpasero

does this go away?

what "this"? the tag never goes away by the way my computer just crashed due to lack of memory, so there's probably some memory leak

Rratic avatar Aug 10 '22 08:08 Rratic

Yeah my hope was to remove the "1 unsaved" tag when you open the file and close it without saving.

bpasero avatar Aug 10 '22 09:08 bpasero

@bpasero Well, today when I opened vscode, the file is yellow with a dot and a "1 unsaved" tag. So I clicked save, and a notification says something like "new file not the same as the old". After I clicked "overwrite", everything is fine. Note that the original version of the file is saved, and it's white.

I don't know why it's different from yesterday, and it may be bad news since it will make it harder to reproduce.

Rratic avatar Aug 11 '22 01:08 Rratic

Well, the issue reappeared when I'm editing another file (julia code). I can't see any pattern here.

Rratic avatar Aug 11 '22 02:08 Rratic

I wonder if this issue is being caused by an installed extension. Can you try to run VS Code without extensions? From the command line (NOT the integrated terminal in Code), execute: code --disable-extensions and try your steps again to see if it reproduces. If you see it is an issue with the extension, please file it against the extension repository itself.

bpasero avatar Aug 11 '22 06:08 bpasero

Disabling extension fixes this one, so I guess it's a bug that julia-extension and markdown-buitlin-utility both shares, which may due to a bug in a special API-use function.

try your steps again to see if it reproduces

I'm doing ordinary things and the issue just bumps into. So ... maybe I shall just do things as usual.

Rratic avatar Aug 11 '22 06:08 Rratic

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

vscodenpa avatar Aug 11 '22 08:08 vscodenpa

Feel free to ping me on the extension issue, I would like to reproduce myself.

bpasero avatar Aug 11 '22 08:08 bpasero