fix CdString for MS Windows

This commit is contained in:
paihu
2018-10-22 21:17:57 +09:00
parent f57ad883f2
commit eae3f70e75
2 changed files with 19 additions and 5 deletions

View File

@@ -65,7 +65,11 @@ endfunction
" Output 'cd <directory> && '
" This function can be used changing the directory for a linter command.
function! ale#path#CdString(directory) abort
return 'cd ' . ale#Escape(a:directory) . ' && '
if has('win32')
return 'cd /d ' . ale#Escape(a:directory) . ' && '
else
return 'cd ' . ale#Escape(a:directory) . ' && '
endif
endfunction
" Output 'cd <buffer_filename_directory> && '