-
Notifications
You must be signed in to change notification settings - Fork 390
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
Incoherent error log when using input #2256
Comments
Thanks! I assume you're the one who mentioned this on reddit. Sorry for the delay in responding; a lot of stuff happening IRL. But I will look into this when I get the time! |
The log pattern for file inclusion does not seem to have a closing bracket immediately after. Fixes lervag#2256.
I've pushed an improvement now in 2f164ee. It may still require some tweaks, so let me know if you find false positives/negatives. |
Does not seem to work for e.g. \documentclass{minimal}
\begin{filecontents*}[overwrite]{source.tex}
\clearpage
\rule{2\textwidth}{1pt}\par
\end{filecontents*}
\begin{document}
~
\input{source.tex}
\end{document} where the log contains the lines
So there can be garbage after the filename. To be safe one would probably need to parse the log for matching opening and closing parantheses and remember the current file context like e.g. the latexrun compiler does. There may still be non-matching parantheses inside of warnings/errors which can throw you off. |
We could probably implement a more robust and strict parser, but for now, I think this particular case can be pragmatically handled. If it works now I'll be happy with that, else I'll consider to go for the more robust approach. |
Description
In a project with
\input{file}
, errors are correctly reported in the errors window with the correct file and line number, whereas warnings report the name of the main file (I'm not sure about the line number). This also effects jumping when typing<CR>
on said warning.Steps to reproduce
I've tried this on both my Arch machines with Neovim and on a fresh Ubuntu docker with Vim (I'll use the latter example as it's simpler).
~/.vimrc
:(only vim-plug and vimtex installed)
The example project has the following two files:
main.tex
:sourceme.tex
:Open one of the two
.tex
and type<leader>cc
.Expected behavior
In the error window:
(and correct jumping)
Actual behavior
(and wrong jumping)
Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: