Closed
Description
- Existing issues searched: true
- Tested under insider edition: true
- Does this issue occur when all extensions are disabled?: true
- VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T23:43:35.476Z)
- OS version: Windows_NT x64 10.0.18362
Bug Report
Steps to reproduce
- Create a webview panel with
viewColumn
set to One - Call
reveal
on the panel withviewColumn
set to Two (not exists yet) - The panel only reveals to Column One.
Workaround to make it right
- Create a webview panel with
viewColumn
set to One - Execute
workbench.action.focusSecondEditorGroup
command to ensure Group Two exists - Call
reveal
on the panel withviewColumn
set to Two (exists now) - The panel reveals to Column Two.
Contrast Example
showTextDocument
Designed behavior
- When clicking
Code Now
, a doc will be called byshowTextDocument
in Column 3.
- If I have 3 Columns, then doc will be open in Column 3.
- If I have 2 Columns, but Column 2 is empty, the doc will be open in Column 2.
- If I have 1 non-empty Column, then doc will be open in Column 2.
This behavior is as by design.
reveal
Designed behavior
- When creating the webview, the panel will be called by
reveal
to Column 3. - When clicking
Code Now
, the panel will be called byreveal
to Column 2.
↑ Here, if all 3 columns exists, the panel will be created to Column 3 and moved to Column 2, as by design.
- If I have 2 non-empty Columns, and creating a new webview, the panel get revealed to Column 2, which should have been in Column 3.
- If I have 2 non-empty Columns, and clicking
Code Now
, the panel get revealed to Column 2, which is as by design. - If I have 1 non-empty Columns, and creating a new webview, the panel get revealed to Column 1, which should have been in Column 2.
- If I have 1 non-empty Columns, and clicking
Code Now
, the panel get revealed to Column 1, which should have been in Column 2.
we only allow revealing text documents in the group one greater than the current number of groups.
So, for WebviewPanel.reveal
, it's not one greater than
, it's equal to
, which is not by design.