Skip to content

Commit

Permalink
Fix error when editing path for shebang (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
yous authored Sep 30, 2020
1 parent 5d7121d commit 3ad297d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autoload/polyglot/shebang.vim
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ func! s:Filetype()

let [_, l:path, l:rest; __] = l:pathrest

let l:script = split(l:path, "/")[-1]
let l:pathparts = split(l:path, "/")

if len(l:pathparts) == 0
return
endif

let l:script = l:pathparts[-1]

if l:script == "env"
let l:argspath = matchlist(l:rest, s:r_env)
Expand Down

0 comments on commit 3ad297d

Please sign in to comment.