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

Diff editor closes when closing left hand side editor in other tab #51039

Closed
MarekLew opened this issue Jun 3, 2018 · 4 comments
Closed

Diff editor closes when closing left hand side editor in other tab #51039

MarekLew opened this issue Jun 3, 2018 · 4 comments
Assignees
Milestone

Comments

@MarekLew
Copy link

@MarekLew MarekLew commented Jun 3, 2018

Issue Type: Bug

  1. Create two files in folder:
mkdir A
echo a1>A/a.txt
echo a2>A/b.txt
  1. 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

@MarekLew MarekLew changed the title diff close where first file cloused Diff close when first file cloused Jun 3, 2018
@bpasero bpasero assigned bpasero and unassigned rebornix Jun 4, 2018
@bpasero bpasero added this to the June 2018 milestone Jun 4, 2018
@bpasero bpasero added the diff-editor label Jun 4, 2018
@bpasero bpasero changed the title Diff close when first file cloused Diff editor closes when closing left hand side editor in other tab Jun 4, 2018
@bpasero bpasero removed this from the June 2018 milestone Jun 4, 2018
@bpasero bpasero added the bug label Jun 4, 2018
@MarekLew

This comment has been minimized.

Copy link
Author

@MarekLew MarekLew commented Jun 30, 2018

@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 :

		if (editor instanceof SideBySideEditorInput) {
			this.updateResourceMap(editor.details, remove);
		}

EditorGroup.mapResourceToEditorCount don`t contains left-hand side resorce from diff editor. For right side is used getResource but left side is ignored.

MarekLew added a commit to MarekLew/vscode that referenced this issue Jun 30, 2018
@bpasero

This comment has been minimized.

Copy link
Member

@bpasero bpasero commented 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

This comment has been minimized.

Copy link
Author

@MarekLew MarekLew commented 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 :)

@bpasero bpasero mentioned this issue Nov 8, 2019
2 of 2 tasks complete
@bpasero bpasero added this to the November 2019 milestone Nov 15, 2019
@bpasero bpasero closed this in d189af8 Nov 15, 2019
@rebornix rebornix added the verified label Dec 4, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.