lhl2617 / VSLilyPond-PDF-preview

Provides PDF Preview for LilyPond-generated PDFs. Supports point-and-click from PDF to source code.
https://marketplace.visualstudio.com/items?itemName=lhl2617.lilypond-pdf-preview
MIT License
7 stars 8 forks source link

"Go to PDF location from cursor" keeps opening pdf as a new tab #113

Open src-x opened 2 years ago

src-x commented 2 years ago

Hi, I am having problems with using the "Go to PDF location from cursor" function. I have the .ly file open to the left side and the pdf open on the right side. When using the "Go to PDF location from cursor" it closes my pdf on the right side and reopens the pdf as a new tab. Thanks for the help.

lhl2617 commented 2 years ago

Heya, thanks for the report--do you have any other pdf extensions? if so, can you disable the others and try to repro?

src-x commented 2 years ago

I do not think I have any pdf extensions. Here is what I am seeing. I have disabled all vscode extensions except for yours. prob1

src-x commented 2 years ago

Found out what was most likely the problem. Not a frequent vscode user here so I was using the latest stable release of vscode. Judging from the repo's last release, decided to use Jan 2021 release of vscode and that "fixed" my issue. I think maybe the issue I see here is the new feature of "groups" added to vscode. I am sure you can reproduce this problem with a newer version of vscode.

lhl2617 commented 2 years ago

Hey, sorry about this. It seems like the code to open the doc might need to be rewritten to consider groups.

Currently do not have time to look into this, sorry :(

gasrodriguez commented 1 year ago

FWIW, I'm not seeing this issue with LilyPond PDF Preview v0.2.8 and VSCode

Version: 1.77.0 (Universal)
Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63
Date: 2023-03-29T09:57:11.797Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.5.0
Sandboxed: No

Maybe @src-x you should try setting this option (which I needed to force pointing to the opened .ly file when going from PDF to location). Search for this setting (CTRL+, and type "reveal if"):

image