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

Recently opened: diff editors are not properly excluded when closed #157395

Closed
Legend-Master opened this issue Aug 6, 2022 · 24 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders quick-open Quick-open issues (search, commands) verified Verification succeeded
Milestone

Comments

@Legend-Master
Copy link
Contributor

Yeah, I know there's an option search.quickOpen.includeHistory, but I don't wanna get rid of all of them, just a few folders

Like **/AppData/Local/Temp/**, so I won't be bothered to clean them up, since there's really no point of keeping those temp files in the quick open history, you can't open them up ever again most of the time anyway

I know files.exclude, but it doesn't seems to exclude things from the history

image

@Legend-Master
Copy link
Contributor Author

It's been a week without any message, will this issue ever gonna be considered?

@TylerLeonhardt
Copy link
Member

Hey sorry. I was on vacation. Something I'm curious about... if you add this to search.exclude do they go away? I doubt it but I just want to make sure.

@Legend-Master
Copy link
Contributor Author

Something I'm curious about... if you add this to search.exclude do they go away? I doubt it but I just want to make sure.

Just tested that, it does not work on recent history (recently opened)

image
image

@TylerLeonhardt TylerLeonhardt added feature-request Request for new features or functionality quick-open Quick-open issues (search, commands) labels Aug 20, 2022
@vscodenpa vscodenpa added this to the Backlog Candidates milestone Aug 20, 2022
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@Drerootz1
Copy link

upvotes needed

@wzsjc2020
Copy link

This is not a big problem, but in some circumstances, it would be typically annoying. I found out VS Code has a mode called protected mode or isolated mode. When you open a unknown source file, it usually opens in that mode. So, hope that will help.

@lancelotqaq-hwj
Copy link

冒泡

@lancelotqaq-hwj
Copy link

吐泥老师这个要点哪个

@vscodenpa
Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@martinfalisse
Copy link

Do I understand #161300 correctly that this feature will not be allowed to progress?

This would be neat to have as a plugin I use to view git history fills the quick open with temp files.

@Legend-Master
Copy link
Contributor Author

I guess the feature is allowed, it's just making files.exclude/search.exclude to do that is not, but I don't think this feature is important to the core team so we'll need to do it ourself

I was thinking about plugins before, but I don't think plugins can change anything in the quick open history, and that's why I opened this issue at the first place

And about a new PR, I'm not sure how to add a config properly (considering we need translations as well) right now, so...

@starball5
Copy link

Related: #16226. Also loosely related on Stack Overflow: How can I exclude files from "Go to File" (Quick Open) in Visual Studio Code?

@starball5
Copy link

Hey sorry. I was on vacation. Something I'm curious about... if you add this to search.exclude do they go away? I doubt it but I just want to make sure.

According to #6502, it's supposed to, is it not?

@tfrokt
Copy link

tfrokt commented Mar 12, 2024

Can I still upvote please? :)

@movy
Copy link

movy commented Mar 13, 2024

A use-case for this setting: recently open files get polluted with tmp stdin files when piping a command output to code (e.g. npm run command | code -):

image

@thiagosolstafir
Copy link

"search.quickOpen.includeHistory": false

@bpasero
Copy link
Member

bpasero commented Apr 26, 2024

With the changes in #203872, search.exclude can will filter out paths from recently opened section, can people try this out? See #203872 (comment)

@maninak
Copy link

maninak commented Apr 27, 2024

@bpasero the extension I'm authoring saves temp files under /tmp/radicle (that's on Linux, it uses equivalent temp dirs on Windows and MacOS) and it seems that currently the exclusion isn't persistent. Here's why I think this issue is still not fixed:

  1. My extension saves two files under /tmp/radicle which it then uses for the built-in command 'vscode.diff' which opens a new diff editor and which I then close (with Ctrl + W).
  2. I press Ctrl + P and see two entries in the "recently opened" menu, one for each of the files used in the diff.
  3. I add "/tmp/radicle/**": true in the config search.exclude.
  4. I press Ctrl + P and no longer see the aforementioned undesired two entries in the "recently opened" menu
  5. I use my extension to open that diff editor again and proceed to close it
  6. I press Ctrl + P and see again those unwanted two entries in the "recently opened" menu, despite the fact that they are located in a path that matches the glob I added in the config search.exclude in step (3).

I consider this a bug. The effect of setting search.exclude should be persistent.

Additional info:

  • I've also tried files.exclude this doesn't even hide them at all
  • I'm using
Version: 1.88.1
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:34:12.840Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Linux x64 6.5.0-27-generic

@Legend-Master
Copy link
Contributor Author

Legend-Master commented Apr 27, 2024

The current solution is pretty much the same as #161300, to be honest, if they function differently, I think a separate setting may work better (don't get me wrong, I'm fine with the current solution, just a suggestion)

@bpasero
Copy link
Member

bpasero commented Apr 28, 2024

@maninak as long as the editor is opened, it will appear in the recently opened list, once you close the editor it will be gone. This was discussed in the linked issue. The reason is that the recently opened list is also used to navigate between opened editors and thus supports this irrespective of the setting for opened editors.

@maninak
Copy link

maninak commented Apr 28, 2024

as long as the editor is opened, it will appear in the recently opened list

yup that's fully understood and makes sense.

once you close the editor it will be gone

You see that's unfortunately not the case though. Please carefully read the precise repro steps I shared above. When you do, you will notice that the observed actual behavior that I'm reporting is not aligned with the expectations you and I both have.

Here, I'll show it in video form too. TL;DW: after closing the diff editor, the two temp and search.excluded files show up in the recently opened list.

Peek.2024-04-28.12-07.mp4

@bpasero
Copy link
Member

bpasero commented Apr 28, 2024

I can confirm for the diff editor case, looks fishy tbh, will have a look.

@bpasero bpasero modified the milestones: Backlog, May 2024 Apr 28, 2024
@bpasero bpasero self-assigned this Apr 28, 2024
@bpasero bpasero added debt Code quality issues bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality debt Code quality issues labels Apr 28, 2024
@bpasero bpasero changed the title Add a setting to exclude files/folders from quick open history Recently opened: diff editors are not properly excluded when closed Apr 28, 2024
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Apr 29, 2024
@bpasero bpasero added the author-verification-requested Issues potentially verifiable by issue author label May 7, 2024
@vscodenpa
Copy link

This bug has been fixed in the latest release of VS Code Insiders!

@Legend-Master, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 00bc155 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@Legend-Master
Copy link
Contributor Author

/verified

@vscodenpa vscodenpa added verified Verification succeeded and removed author-verification-requested Issues potentially verifiable by issue author labels May 7, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 13, 2024
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 insiders-released Patch has been released in VS Code Insiders quick-open Quick-open issues (search, commands) verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

15 participants