-
Notifications
You must be signed in to change notification settings - Fork 362
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
Fix error message when jumping to pdf from non-.tex-file #1472
Fix error message when jumping to pdf from non-.tex-file #1472
Conversation
Thanks |
Previously when compiling from a non-.tex file (such as a .sty file in which you are working), compiling would be succesful, but trying to view it would give an error that it was impossible to jump from something else than a .tex-file. This is true when trying to jump with a keybinding, but in a new compilation, this should just open the PDF at the same page it already was (or the first page if the PDF wasn't open). This change fixes that by checking whether the command was invoked from a keybinding or not.
@r-stein I actually did try to fix the open question I posed: see the new commits. It solved my problem and I think this should work in all situations, but I'm not familiar enough with the code base to be completely sure. Could you review it? |
@rensbaardman I think I might be willing to merge this, but it's awfully hard to follow what was actually changed in this PR. Could you point out the relevant lines if you remember? |
@ig0774 My apologies, looking back this is certainly not a clean PR, and I should have split up the cleaning and the fix. I was trying to do two things:
|
@rensbaardman That's fine... that sort of thing happens... made only more difficult by the pending refactors I've just merged in. I think the captures the import part. Thanks! |
The combination of space and tab indentation in jumpToPDF.py -possibly appears in b27fc39 (merging SublimeText#1472) prevents PDF viewer from opening after build, and removes View PDF and Jump to PDF commands from command list (See SublimeText#1539).
The combination of space and tab indentation in jumpToPDF.py -possibly appears in b27fc39 (merging SublimeText#1472) prevents PDF viewer from opening after build, and removes View PDF and Jump to PDF commands from command list (See SublimeText#1539).
There was ST1-syntax being used (the same as in #51) that caused a Python error. This PR fixes that, so when you are in a non-
.tex
-file and try to jump to the PDF, it gives the Sublime error "$FILE is not a TeX source file: cannot jump.".This still leaves another question to me: I encountered this bug when I tried to recompile from a non-
.tex
-file. In that case, I think there should not be an error message, but instead it should either:Should I open an issue for that? I am not familiar enough with the code base to fix it myself.