summaryrefslogtreecommitdiff
path: root/autoload/ale/c.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/ale/c.vim')
-rw-r--r--autoload/ale/c.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/autoload/ale/c.vim b/autoload/ale/c.vim
index 64668dd5..d0a4fa06 100644
--- a/autoload/ale/c.vim
+++ b/autoload/ale/c.vim
@@ -501,10 +501,10 @@ endfunction
function! ale#c#GetMakeCommand(buffer) abort
if s:CanParseMakefile(a:buffer)
- let l:makefile_path = ale#path#FindNearestFile(a:buffer, 'Makefile')
+ let l:path = ale#path#FindNearestFile(a:buffer, 'Makefile')
- if !empty(l:makefile_path)
- return 'cd '. fnamemodify(l:makefile_path, ':p:h') . ' && make -n'
+ if !empty(l:path)
+ return ale#path#CdString(fnamemodify(l:path, ':h')) . 'make -n'
endif
endif