summaryrefslogtreecommitdiff
path: root/contrib/vim/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/vim/compiler')
-rw-r--r--contrib/vim/compiler/ledger.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/vim/compiler/ledger.vim b/contrib/vim/compiler/ledger.vim
index 33b019cb..b6bb7fb4 100644
--- a/contrib/vim/compiler/ledger.vim
+++ b/contrib/vim/compiler/ledger.vim
@@ -12,7 +12,7 @@ if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
-if ! exists("g:ledger_bin") || ! executable(g:ledger_bin)
+if ! exists("g:ledger_bin") || empty(g:ledger_bin) || ! executable(split(g:ledger_bin, '\s')[0])
if executable('ledger')
let g:ledger_bin = 'ledger'
else
@@ -24,8 +24,9 @@ endif
" %-G throws away blank lines, everything else is assumed to be part of a
" multi-line error message.
CompilerSet errorformat=%-G,%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:%.%#,%ZError:\ %m,%C%.%#
+CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m
" unfortunately there is no 'check file' command,
" so we will just use a query that returns no results. ever.
-exe 'CompilerSet makeprg='.g:ledger_bin.'\ -f\ %\ reg\ not\ ''.*''\ \>\ /dev/null'
+exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ %\ reg\ not\ ''.*''\ \>\ /dev/null'