Checker chktex: avoid passing control characters under "cmd.exe".

This commit is contained in:
LCD 47 2017-09-26 11:06:49 +03:00
parent cf02b6e29d
commit cd871da6b4
3 changed files with 12 additions and 3 deletions

View File

@ -6459,7 +6459,7 @@ Default: 1
Whether to show informational messages ("chktex" option "-m"). By default
informational messages are shown as warnings.
Note~
Notes~
If you're checking files containing tab characters, then Vim's 'tabstop'
must match "ChkTeX"'s idea of tabstop, otherwise column numbers will be
@ -6467,6 +6467,9 @@ shifted. At the time of this writing, "ChkTeX"'s tabstop is hardcoded to 8,
so you should probably add something like this to your vimrc: >
set tabstop=8
<
Note also that because of the way "ChkTeX" handles error formats column
numbers are not available on Windows when running under "cmd.exe".
------------------------------------------------------------------------------
2. lacheck *syntastic-tex-lacheck*

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.8.0-84'
let g:_SYNTASTIC_VERSION = '3.8.0-87'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

View File

@ -27,12 +27,18 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_tex_chktex_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args_after': ['-q', '-f', "%k:%n:%f:%l:%c:%m\n"] })
if !exists('s:sumb_quoting')
let s:dumb_quoting = syntastic#util#isRunningWindows() && exists('+shellslash') && !&shellslash
endif
let makeprg = self.makeprgBuild({ 'args_after': (s:dumb_quoting ? ['-q', '-v1'] : ['-q', '-f', "%k:%n:%f:%l:%c:%m\n"]) })
let errorformat =
\ '%EError:%n:%f:%l:%v:%m,' .
\ '%WWarning:%n:%f:%l:%v:%m,' .
\ (g:syntastic_tex_chktex_showmsgs ? '%WMessage:%n:%f:%l:%v:%m,' : '') .
\ '%EError %n in %f line %l: %m,' .
\ '%WWarning %n in %f line %l: %m,' .
\ (g:syntastic_tex_chktex_showmsgs ? '%WMessage %n in %f line %l: %m,' : '') .
\ '%Z%p^,' .
\ '%-G%.%#'