mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-10 12:33:51 -05:00
Eeplace array slice with while loops for Vim 7.4 (#677)
Workaround for: E117: Unknown function: i:len E15: Invalid expression: rtp[i:len(rtp)-1]
This commit is contained in:
@@ -3609,19 +3609,22 @@ func! s:process_rtp(rtp)
|
|||||||
" Then vim-polyglot
|
" Then vim-polyglot
|
||||||
call add(result, s:base)
|
call add(result, s:base)
|
||||||
" Then all other files, until after-files
|
" Then all other files, until after-files
|
||||||
for path in rtp[i:len(rtp)-1]
|
while i < len(rtp)
|
||||||
|
let path = rtp[i]
|
||||||
if match(path, '[/\\]after$') > -1
|
if match(path, '[/\\]after$') > -1
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
call add(result, path)
|
call add(result, path)
|
||||||
let i = i + 1
|
let i = i + 1
|
||||||
endfor
|
endwhile
|
||||||
" Then vim-polyglot after path
|
" Then vim-polyglot after path
|
||||||
call add(result, s:base . '/after')
|
call add(result, s:base . '/after')
|
||||||
" Then all other after paths
|
" Then all other after paths
|
||||||
for path in rtp[i:len(rtp)-1]
|
while i < len(rtp)
|
||||||
|
let path = rtp[i]
|
||||||
call add(result, path)
|
call add(result, path)
|
||||||
endfor
|
let i = i + 1
|
||||||
|
endwhile
|
||||||
" User's after directory is always last
|
" User's after directory is always last
|
||||||
call add(result, a:rtp[len(a:rtp)-1])
|
call add(result, a:rtp[len(a:rtp)-1])
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user