-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
DocumentsMainImpl.toEditorOpenerOptions should convert ViewColumn to zero-based index #6801
Comments
I found there are two other reference of one of that convert the viewColumn to zero-based index using theia/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts Lines 78 to 103 in a99b585
I think assigning 0 value to a viewColumn may be confused, we shoud do that inside the |
@godlin-gh it sounds reasonable, feel free to work on it. |
… toEditorOpenerOptions() method Signed-off-by: Gan Lin <[email protected]>
… toEditorOpenerOptions() method Signed-off-by: Gan Lin <[email protected]>
Description
when i call plugin api window.showTextDocument, the call hierarchy looks like:
DocumentsMainImpl.$tryShowDocument -> DocumentsMainImpl.toEditorOpenerOptions
theia/packages/plugin-ext/src/main/browser/documents-main.ts
Lines 176 to 188 in a99b585
theia/packages/plugin-ext/src/main/browser/documents-main.ts
Lines 240 to 246 in a99b585
the ViewColumn type use one-based index which should be convert to zero-based index inside
toEditorOpenerOptions
methodReproduction Steps
try to call window.showTextDocument(xx, { viewColumn: ViewColumn.One }), you can never open an editor on first column.
OS and Theia version:
master
Diagnostics:
The text was updated successfully, but these errors were encountered: