From 7c638f6f70ce2cbf96b87ccfc55ed558d49b144c Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Mon, 11 Nov 2013 22:14:05 +0200 Subject: [PATCH] Minor cleanup. --- autoload/syntastic/c.vim | 4 ++-- plugin/syntastic/makeprg_builder.vim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/syntastic/c.vim b/autoload/syntastic/c.vim index bab36862..1914b0f9 100644 --- a/autoload/syntastic/c.vim +++ b/autoload/syntastic/c.vim @@ -56,7 +56,7 @@ function! syntastic#c#ReadConfig(file) endif endfor - return join(map(parameters, 'syntastic#util#shescape(fnameescape(v:val))'), ' ') + return join(map(parameters, 'syntastic#util#shescape(fnameescape(v:val))')) endfunction " GetLocList() for C-like compilers @@ -178,7 +178,7 @@ function! s:GetIncludeDirs(filetype) call extend(include_dirs, g:syntastic_{a:filetype}_include_dirs) endif - return join(map(syntastic#util#unique(include_dirs), 'syntastic#util#shescape(fnameescape("-I" . v:val))'), ' ') + return join(map(syntastic#util#unique(include_dirs), 'syntastic#util#shescape(fnameescape("-I" . v:val))')) endfunction " search the first 100 lines for include statements that are diff --git a/plugin/syntastic/makeprg_builder.vim b/plugin/syntastic/makeprg_builder.vim index 2b11037b..d38bd59b 100644 --- a/plugin/syntastic/makeprg_builder.vim +++ b/plugin/syntastic/makeprg_builder.vim @@ -27,7 +27,7 @@ function! g:SyntasticMakeprgBuilder.New(checker, exe, args, fname, post_args, ta endfunction function! g:SyntasticMakeprgBuilder.makeprg() - return join([self.exe(), self.args(), self.fname(), self.post_args(), self.tail()]) + return join(filter([self.exe(), self.args(), self.fname(), self.post_args(), self.tail()], '!empty(v:val)')) endfunction function! g:SyntasticMakeprgBuilder.exe()