File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
autoload/vital/__vital__/System Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ let s:is_cygwin = has('win32unix')
15
15
let s: is_mac = ! s: is_windows && ! s: is_cygwin
16
16
\ && (has (' mac' ) || has (' macunix' ) || has (' gui_macvim' ) ||
17
17
\ (! isdirectory (' /proc' ) && executable (' sw_vers' )))
18
+ " windows expand follow do not need for file extention
18
19
let s: is_case_tolerant = filereadable (expand (' <sfile>:r' ) . ' .VIM' )
19
20
20
21
if s: is_windows
@@ -203,8 +204,8 @@ function! s:expand_home(path) abort
203
204
endif
204
205
let post_home_idx = match (a: path , s: path_sep_pattern )
205
206
return post_home_idx is # -1
206
- \ ? s: remove_last_separator (expand (a: path ))
207
- \ : s: remove_last_separator (expand (a: path [0 : post_home_idx - 1 ]))
207
+ \ ? s: remove_last_separator (s: expand (a: path ))
208
+ \ : s: remove_last_separator (s: expand (a: path [0 : post_home_idx - 1 ]))
208
209
\ . a: path [post_home_idx :]
209
210
endfunction
210
211
@@ -279,6 +280,22 @@ function! s:contains(path, base) abort
279
280
return pathlist[: baselistlen - 1 ] == # baselist
280
281
endfunction
281
282
283
+ if s: is_windows && exists (' &completeslash' )
284
+ function ! s: expand (path ) abort
285
+ let backup_completeslash = &completeslash
286
+ try
287
+ set completeslash &
288
+ return expand (a: path )
289
+ finally
290
+ let &completeslash = backup_completeslash
291
+ endtry
292
+ endfunction
293
+ else
294
+ function ! s: expand (path ) abort
295
+ return expand (a: path )
296
+ endfunction
297
+ endif
298
+
282
299
let &cpo = s: save_cpo
283
300
unlet s: save_cpo
284
301
You can’t perform that action at this time.
0 commit comments