summaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorSezi <marek.sezemsky@gmail.com>2021-04-14 11:56:21 +0200
committerGitHub <noreply@github.com>2021-04-14 11:56:21 +0200
commit3c5fca7621a1f5e53911195ebb6e7c777fad8031 (patch)
tree59863f92da756a35d069edee9c12cc5d0d5cc0d2 /autoload
parenteda351ca897ca0270ed8b01798af3679914683a1 (diff)
downloadvim-polyglot-3c5fca7621a1f5e53911195ebb6e7c777fad8031.tar.gz
vim-polyglot-3c5fca7621a1f5e53911195ebb6e7c777fad8031.zip
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]
Diffstat (limited to 'autoload')
-rw-r--r--autoload/polyglot/init.vim11
1 files changed, 7 insertions, 4 deletions
diff --git a/autoload/polyglot/init.vim b/autoload/polyglot/init.vim
index d76343f0..1784f4e1 100644
--- a/autoload/polyglot/init.vim
+++ b/autoload/polyglot/init.vim
@@ -3609,19 +3609,22 @@ func! s:process_rtp(rtp)
" Then vim-polyglot
call add(result, s:base)
" 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
break
endif
call add(result, path)
let i = i + 1
- endfor
+ endwhile
" Then vim-polyglot after path
call add(result, s:base . '/after')
" 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)
- endfor
+ let i = i + 1
+ endwhile
" User's after directory is always last
call add(result, a:rtp[len(a:rtp)-1])
return result