Skip to content

Commit

Permalink
fix(qf): adjust handler for missing character
Browse files Browse the repository at this point in the history
refer: #2943
  • Loading branch information
lervag committed Apr 28, 2024
1 parent 18caede commit 8b668fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion autoload/vimtex/qf/latexlog.vim
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function! s:qf.set_errorformat() abort dict "{{{1
setlocal errorformat+=%E!\ LaTeX\ %trror:\ %m
setlocal errorformat+=%E%f:%l:\ %m
setlocal errorformat+=%+ERunaway\ argument?
setlocal errorformat+=%-G{/%m
setlocal errorformat+=%+C{%m
setlocal errorformat+=%C!\ %m
setlocal errorformat+=%EMissing\ character:\ %m

" More info for undefined control sequences
setlocal errorformat+=%Z<argument>\ %m
Expand All @@ -63,6 +63,8 @@ function! s:qf.set_errorformat() abort dict "{{{1
setlocal errorformat+=%+WUnderfull\ %\\%\\hbox%.%#\ at\ lines\ %l--%*\\d
setlocal errorformat+=%+WUnderfull\ %\\%\\vbox%.%#\ at\ line\ %l

setlocal errorformat+=%+WMissing\ character:\ %m

"
" Define package related warnings
"
Expand Down
7 changes: 2 additions & 5 deletions test/example-quickfix/main.log
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

Missing character: There is no ^^A (U+0001) in font [lmroman10-regular]:+tlig;!
.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box
\__shipout_drop_firstpage_...
l.9 \end{document}

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux)

./test.tex:11: Undefined control sequence.
l.11 \cdashline
{1-7}
Expand Down
2 changes: 1 addition & 1 deletion test/test-quickfix/test-latexlog.vim
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for s:expect in [
\ {'lnum': 0, 'type': 'E', 'text': "Runaway argument?\n{\\sqrt {{1}} \\end {equation} \\par \\end {document} \nFile ended while scanning use of \\frac ."},
\ {'lnum': 0, 'type': 'E', 'text': 'Runaway argument?'},
\ {'lnum': 16, 'type': 'E', 'text': 'Paragraph ended before \date was complete.'},
\ {'lnum': 0, 'type': 'E', 'text': 'There is no ^^A (U+0001) in font [lmroman10-regular]:+tlig;!'},
\ {'lnum': 0, 'type': 'W', 'text': 'Missing character: There is no ^^A (U+0001) in font [lmroman10-regular]:+tlig;!'},
\ {'lnum': 11, 'type': 'E', 'text': "Undefined control sequence.\n\\cdashline"},
\]
call assert_equal(s:expect.lnum, s:qf[s:n].lnum, 'Failed at index ' . s:n)
Expand Down

0 comments on commit 8b668fb

Please sign in to comment.