mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-28 05:42:16 +08:00
Fix C flag parsing and tests on Windows
This commit is contained in:
@@ -24,6 +24,14 @@ function! ale#path#Simplify(path) abort
|
||||
return substitute(simplify(l:win_path), '^\\\+', '\', 'g') " no-custom-checks
|
||||
endfunction
|
||||
|
||||
" Simplify a path without a Windows drive letter.
|
||||
" This function can be used for checking if paths are equal.
|
||||
function! ale#path#RemoveDriveLetter(path) abort
|
||||
return has('win32') && a:path[1:2] is# ':\'
|
||||
\ ? ale#path#Simplify(a:path[2:])
|
||||
\ : ale#path#Simplify(a:path)
|
||||
endfunction
|
||||
|
||||
" Given a buffer and a filename, find the nearest file by searching upwards
|
||||
" through the paths relative to the given buffer.
|
||||
function! ale#path#FindNearestFile(buffer, filename) abort
|
||||
|
||||
Reference in New Issue
Block a user