Repository navigation
Closed
Labels
bugIssue identified by VS Code Team member as probable bugdiff-editorDiff editor issuesverifiedVerification succeeded
Milestone
Description
Issue Type: Bug
- Create two files in folder:
mkdir A
echo a1>A/a.txt
echo a2>A/b.txt
- Open folder A and file b.txt
code A
code A/b.txt
3.a. compare A/b.txt to A/a.txt
CRT+SHIFT+P
File: Compare Active file With ...
select a.txt
3.b. compare A/b.txt to A.a.txt from command line
code --diff A/b.txt A/a.txt
4. clouse file b.txt
Then diff tab is closer
VS Code version: Code 1.23.1 (d0182c3, 2018-05-10T16:04:33.747Z)
OS version: Linux x64 4.13.0-43-generic
and on windows 10
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (4 x 903) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software rasterization: disabled_software video_decode: unavailable_software video_encode: enabled vpx_decode: unavailable_software webgl: enabled webgl2: enabled |
| Load (avg) | 1, 0, 0 |
| Memory (System) | 3.77GB (0.91GB free) |
| Process Argv | /usr/share/code/code A |
| Screen Reader | no |
| VM | 0% |
Extensions (38)
| Extension | Author (truncated) | Version |
|---|---|---|
| bracket-pair-colorizer | Coe | 1.0.55 |
| vs-treeview | DaG | 2.5.0 |
| vsc-material-theme | Equ | 2.1.0 |
| virtual-folders | Gru | 0.1.2-b1 |
| taskmarks | Nor | 0.6.1 |
| Bookmarks | ale | 0.19.1 |
| project-manager | ale | 0.25.2 |
| code-gnu-global | aus | 0.2.2 |
| spellright | ban | 2.5.0 |
| npm-intellisense | chr | 1.3.0 |
| python-snippets | cst | 0.2.0 |
| jshint | dba | 0.10.18 |
| vscode-eslint | dba | 1.4.10 |
| gitlens | eam | 8.3.3 |
| tslint | eg2 | 1.0.30 |
| vscode-npm-script | eg2 | 0.3.4 |
| LogFileHighlighter | emi | 2.4.0 |
| git-project-manager | fel | 1.6.1 |
| favorites | kdc | 1.4.4 |
| vscode-gist | ken | 1.2.0 |
| git-tree-compare | let | 1.2.1 |
| cmake-tools-helper | mad | 0.2.1 |
| MagicPython | mag | 1.0.12 |
| vscode-checkpoints | mic | 1.0.1 |
| vscode-clang | mit | 0.2.2 |
| quicksnippet | mou | 0.0.1 |
| hg | mrc | 1.2.3 |
| python | ms- | 2018.4.0 |
| cpptools | ms- | 0.17.4 |
| vscode-code-outline | pat | 0.2.1 |
| annotator | ryu | 0.11.0 |
| partial-diff | ryu | 1.1.0 |
| guides | spy | 0.9.1 |
| python | tht | 0.2.3 |
| cmake | twx | 0.0.17 |
| cmake-tools | vec | 0.11.1 |
| gitflow | vec | 1.2.1 |
| local-history | xyz | 1.6.2 |
Does this issue occur when all extensions are disabled?: Yes
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugdiff-editorDiff editor issuesverifiedVerification succeeded
Activity
[-]diff close where first file cloused[/-][+]Diff close when first file cloused[/+][-]Diff close when first file cloused[/-][+]Diff editor closes when closing left hand side editor in other tab[/+]bpasero commentedon Jun 4, 2018
Happens somewhere around here:
https://github.com/Microsoft/vscode/blob/eb1d9729cd6104019f34b05099e509ee33ef3502/src/vs/workbench/browser/parts/editor/editorGroupView.ts#L482
MarekLew commentedon Jun 30, 2018
Benjamin Pasero (@bpasero) I found problem in (
updateResourceMap):https://github.com/Microsoft/vscode/blob/eb1d9729cd6104019f34b05099e509ee33ef3502/src/vs/workbench/common/editor/editorGroup.ts#L522
please add code like this at the begin line in
updateResourceMap:EditorGroup.mapResourceToEditorCountdon`t contains left-hand side resorce from diff editor. For right side is used getResource but left side is ignored.fix microsoft#51039 mapResourceToEditorCount for SideBySideEditorInpu…
bpasero commentedon Jul 1, 2018
I appreciate the investigation but the fix is more involved than just that, that is why I did not add the "help wanted" label.
MarekLew commentedon Jul 1, 2018
No problem. I just pointed out that the bug is not where you marked it(not only when editor clause but open). In my opinion bug is in counting of resources.
It works for me :)