|
10 | 10 | " vim: set ts=4 sw=4 tw=78 noet :
|
11 | 11 |
|
12 | 12 |
|
| 13 | +"---------------------------------------------------------------------- |
| 14 | +" internal |
| 15 | +"---------------------------------------------------------------------- |
| 16 | +let s:windows = has('win32') || has('win95') || has('win64') || has('win16') |
| 17 | + |
| 18 | + |
13 | 19 | "----------------------------------------------------------------------
|
14 | 20 | " output msg
|
15 | 21 | "----------------------------------------------------------------------
|
@@ -129,4 +135,20 @@ function! asyncrun#utils#quickfix_request()
|
129 | 135 | endfunc
|
130 | 136 |
|
131 | 137 |
|
| 138 | +"---------------------------------------------------------------------- |
| 139 | +" compare path |
| 140 | +"---------------------------------------------------------------------- |
| 141 | +function! asyncrun#utils#path_equal(path1, path2) abort |
| 142 | + let p1 = fnamemodify(a:path1, ':p') |
| 143 | + let p2 = fnamemodify(a:path2, ':p') |
| 144 | + if has('win32') || has('win16') || has('win64') || has('win95') |
| 145 | + let p1 = tolower(substitute(p1, '\/', '\\', 'g')) |
| 146 | + let p2 = tolower(substitute(p2, '\/', '\\', 'g')) |
| 147 | + else |
| 148 | + let p1 = substitute(p1, '\\', '\/', 'g') |
| 149 | + let p2 = substitute(p2, '\\', '\/', 'g') |
| 150 | + endif |
| 151 | + return (p1 == p2)? 1 : 0 |
| 152 | +endfunc |
| 153 | + |
132 | 154 |
|
0 commit comments