summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-11-02 18:32:43 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-11-02 18:32:43 +0100
commit32f5e907370d5b635df9372b202b39492dc5dfd8 (patch)
tree728dc4bae3e0d82aea6603d04574246bb9e0e2d7
parentd96f11bcd81231af1540e164152bfba11002bee9 (diff)
downloadvim-polyglot-32f5e907370d5b635df9372b202b39492dc5dfd8.tar.gz
vim-polyglot-32f5e907370d5b635df9372b202b39492dc5dfd8.zip
Do not use [0:-1] syntax, fixes #616
-rw-r--r--ftdetect/polyglot.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 59878c52..3b50d4d3 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -3506,7 +3506,7 @@ func! s:process_rtp(rtp)
let result = [a:rtp[0]]
" Then all other stuff (until vimruntime)
let i = 0
- for path in rtp[0:-1]
+ for path in rtp[0:len(rtp)-1]
if path == s:runtime
break
endif
@@ -3516,7 +3516,7 @@ 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:-1]
+ for path in rtp[i:len(rtp)-1]
if match(path, '[/\\]after$') > -1
break
endif
@@ -3526,11 +3526,11 @@ func! s:process_rtp(rtp)
" Then vim-polyglot after path
call add(result, s:base . '/after')
" Then all other after paths
- for path in rtp[i:-1]
+ for path in rtp[i:len(rtp)-1]
call add(result, path)
endfor
" User's after directory is always last
- call add(result, a:rtp[-1])
+ call add(result, a:rtp[len(a:rtp)-1])
return result
endfunc