Skip to content

Commit

Permalink
feat(qf): parse more line numbers
Browse files Browse the repository at this point in the history
refer: #3097
  • Loading branch information
lervag committed Feb 12, 2025
1 parent dfaf26c commit 10c6c16
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autoload/vimtex/qf/latexlog.vim
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ function! s:qf.set_errorformat() abort dict "{{{1
" Define general warnings
"
setlocal errorformat+=%+WLaTeX\ Font\ Warning:\ %.%#line\ %l%.%#
setlocal errorformat+=%-CLaTeX\ Font\ Warning:\ %m
setlocal errorformat+=%+WLaTeX\ Font\ Warning:\ %m
setlocal errorformat+=%-C(Font)\ %#%m\ on\ input\ line\ %l%.
setlocal errorformat+=%-C(Font)%m

setlocal errorformat+=%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#
setlocal errorformat+=%+WLaTeX\ %.%#Warning:\ %m
setlocal errorformat+=%-C\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %m\ on\ input\ line\ %l%.

setlocal errorformat+=%+WOverfull\ %\\%\\hbox%.%#\ at\ lines\ %l--%*\\d
setlocal errorformat+=%+WOverfull\ %\\%\\hbox%.%#\ at\ line\ %l
Expand Down
6 changes: 6 additions & 0 deletions test/example-quickfix/main.log
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ and I'll forget about whatever was undefined.
!pdfTeX error: pdflatex (file ./a.pdf): PDF inclusion: required page does not exist <1>

./b.tex:5: ==> Fatal error occurred, no output PDF file produced!

LaTeX Font Warning: Font shape `OT1/cmr/bx/n' in size <8.43146> not available
(Font) size <8> substituted on input line 5.

LaTeX Warning: No positions in optional float specifier.
Default added (so using `tbp') on input line 6.
2 changes: 2 additions & 0 deletions test/test-quickfix/test-latexlog.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ let s:expected_list = [
\ {'lnum': 0, 'type': 'W', 'text': "Overfull \\vbox (303.66812pt too high) has occurred while \\output is active []"},
\ {'lnum': 0, 'type': 'W', 'text': 'Missing character: There is no ^^A (U+0001) in font [lmroman10-regular]:+tlig;!'},
\ {'lnum': 4, 'type': 'W', 'text': 'Class memoir Warning: As of 2018, \fixpdflayout\ is no longer used'},
\ {'lnum': 5, 'type': 'W', 'text': "LaTeX Font Warning: Font shape `OT1/cmr/bx/n' in size <8.43146> not available\nsize <8> substituted"},
\ {'lnum': 6, 'type': 'W', 'text': "LaTeX Warning: No positions in optional float specifier.\nDefault added (so using `tbp')"},
\]
let s:qf = getqflist()
call assert_equal(
Expand Down

0 comments on commit 10c6c16

Please sign in to comment.