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

Wrong position in two-row layout #270

Closed
lvjr opened this issue Mar 14, 2024 · 4 comments · Fixed by #274
Closed

Wrong position in two-row layout #270

lvjr opened this issue Mar 14, 2024 · 4 comments · Fixed by #274

Comments

@lvjr
Copy link

lvjr commented Mar 14, 2024

Describe the bug

It seems typst-preview doesn't check current layout and always opens preview on the right side of the window.

To Reproduce
Steps to reproduce the behavior (Library test):

  1. Select vscode menu item "View->Editor Layout->Two Rows".
  2. Click the typst-preview button.

Expected behavior
The preview should appear on the bottom of the window. But it always appears on the right.

Package/Software version:

VSCode version(Help -> About):

Version: 1.87.2 (user setup)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.19045

typst-preview extension version: v0.10.10

@Enter-tainer
Copy link
Owner

We use viewcolumn.beside https://github.com/Enter-tainer/typst-preview/blob/main/addons/vscode/src/extension.ts#L449

VSCode api provide other types but they don't look interesting. I think maybe it vscode's limitation? Is there any extension that opens a new window can correctly position itself? I can take a look at its code find out how to do this.

@lvjr
Copy link
Author

lvjr commented Mar 14, 2024

When I use latex-workshop extension to typeset latex documents, the position of the preview is correct in two-row layout.

@Enter-tainer
Copy link
Owner

ty, i will look into that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants