mirror of
https://github.com/jdonaldson/vaxe
synced 2024-09-16 13:44:03 +02:00
altered errorformat if -D absolute_path is set
This commit is contained in:
parent
8a2fc2c52e
commit
da4499a4df
2 changed files with 18 additions and 7 deletions
|
@ -221,6 +221,23 @@ function! s:SetCompiler()
|
|||
let &l:makeprg = build_command
|
||||
" only use simple info message for catching traces (%I%m), haxe doesn't
|
||||
" output the full file path in the trace output
|
||||
|
||||
let lines = readfile(vaxe_hxml)
|
||||
let abspath = filter(lines,'match(v:val,"^\s*-D\s*absolute_path")')
|
||||
|
||||
" if -D absolute_path is specified, then traces contain path information,
|
||||
" and errorfmt can use the file/folder location
|
||||
if (len(abspath))
|
||||
echomsg 'hi'
|
||||
let &l:errorformat="%E%f:%l: characters %c-%*[0-9] : %m
|
||||
\,%E%f:%l: lines %*[0-9]-%*[0-9] : %m
|
||||
\,%I%f:%l: %m"
|
||||
"\,%I%m"
|
||||
else
|
||||
let &l:errorformat="%E%f:%l: characters %c-%*[0-9] : %m
|
||||
\,%E%f:%l: lines %*[0-9]-%*[0-9] : %m
|
||||
\,%I%m"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" returns a list of compiler class paths
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
|
||||
|
||||
" select a build file if none is available
|
||||
" this function sets the makeprg
|
||||
" this function sets the makeprg and errorformat
|
||||
if !exists("b:vaxe_hxml")
|
||||
call vaxe#AutomaticHxml()
|
||||
endif
|
||||
|
||||
" errorformat captures error with character range, with lines, or a general
|
||||
" output on standard out
|
||||
|
||||
let &l:errorformat="%E%f:%l: characters %c-%*[0-9] : %m
|
||||
\,%E%f:%l: lines %*[0-9]-%*[0-9] : %m
|
||||
\,%I%m"
|
||||
|
||||
|
|
Loading…
Reference in a new issue