Skip to content

Modify closeOnFileDelete default to agree with VSCode#9720

Merged
colin-grant-work merged 1 commit intomasterfrom
bugfix/closeOnFileDelete-default
Jul 9, 2021
Merged

Modify closeOnFileDelete default to agree with VSCode#9720
colin-grant-work merged 1 commit intomasterfrom
bugfix/closeOnFileDelete-default

Conversation

@colin-grant-work
Copy link
Contributor

What it does

Modifies the default value of workbench.editor.closeOnFileDelete to agree with VSCode. We have it set to true, they have it set to false. false is a better default, I think - closing fewer editors automatically is safer.

https://github.com/microsoft/vscode/blob/40b2219e394fd4721934b4007ae0b2890b6b086a/src/vs/workbench/browser/workbench.contribution.ts#L163-L167

How to test

  1. Open a workspace with no modifications to the workbench.editor.closeOnFileDelete preference.
  2. Check the preferences UI and observe that the preference is set to false, and that setting it to true gives you a blue modified border.
  3. Open a file, then delete it, and observe that the editor doesn't close, but does mark itself as (deleted).

Review checklist

Reminder for reviewers

Signed-off-by: Colin Grant colin.grant@ericsson.com

Signed-off-by: Colin Grant <colin.grant@ericsson.com>
@colin-grant-work colin-grant-work added preferences issues related to preferences vscode issues related to VSCode compatibility labels Jul 8, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me, I believe it was a typo to have it true by default as the original pull-request mentioned false was the default (#8731).

The disabling of the preference also makes sense to me, and aligns with vscode as files deleted outside the application are no longer automatically closed within the application 👍

@colin-grant-work colin-grant-work merged commit dc02028 into master Jul 9, 2021
@colin-grant-work colin-grant-work deleted the bugfix/closeOnFileDelete-default branch July 9, 2021 14:08
@github-actions github-actions bot added this to the 1.16.0 milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preferences issues related to preferences vscode issues related to VSCode compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants