Enter-tainer / typst-preview

[DEPRECATED] Use tinymist instead

Home Page:https://Enter-tainer.github.io/typst-preview/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong position in two-row layout

lvjr opened this issue · comments

commented

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

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.

commented

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

ty, i will look into that