Skip to content

Can't close file without overwriting #125405

@AliAlmohsen

Description

@AliAlmohsen

Issue Type: Bug

  1. Open a file with some git history
  2. Make changes to the file without saving
  3. Change to another git branch
  4. Close this file
  5. It'll ask if you want to save, click discard changes
  6. The file appears again in the same state as if you didn't close the file.

The only way to get out of this state is to save changes, overwrite, then go to git and undo changes.

VS Code version: Code 1.56.2 (054a929, 2021-05-12T17:44:30.902Z)
OS version: Darwin x64 20.5.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 21, 13, 7
Memory (System) 16.00GB (0.47GB free)
Process Argv --crash-reporter-id 9f6dd278-1555-46d8-a047-d7043ede85db
Screen Reader no
VM 0%
Extensions (23)
Extension Author (truncated) Version
htmltagwrap bra 0.0.7
vscode-postgres cko 1.1.17
bracket-pair-colorizer-2 Coe 0.2.0
vscode-eslint dba 2.1.20
githistory don 0.6.16
es7-react-js-snippets dsz 3.1.1
gitlens eam 11.4.1
carbon-now-sh eri 1.2.0
json-tools eri 1.0.2
prettier-vscode esb 6.4.0
vscode-open-multiple-files fab 1.4.0
auto-close-tag for 0.5.10
auto-rename-tag for 0.1.6
vscode-env Iro 0.1.0
jbockle-format-files jbo 3.3.0
vscode-styled-components jpo 1.6.4
vsliveshare ms- 1.0.4360
color-highlight nau 2.3.0
vscode-jest Ort 4.0.2
vscode-paste-and-indent Rub 0.0.8
sass-indented syl 1.8.16
vscode-icons vsc 11.4.0
vscode-import-cost wix 2.15.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
vspre833cf:30267465
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
pythondataviewer:30285071
vscus158cf:30286554
vscgsv2:30307504
vscorehov:30309549
bridgeflightcf:30302070
vscod805:30301674

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions