Skip to content

Commit

Permalink
Fix s:sep error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Dec 31, 2023
1 parent f728a00 commit 7329dfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoload/dein/autoload.vim
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function! dein#autoload#_source(plugins) abort

" Register for lazy loaded denops plugin
if (plugin.rtp .. '/denops')->isdirectory()
const sep = has('win32') ? '\' : '/'
for name in 'denops/*/main.ts'
\ ->globpath(plugin.rtp, v:true, v:true)
\ ->map({ _, val -> val->fnamemodify(':h:t')})
Expand All @@ -76,13 +77,13 @@ function! dein#autoload#_source(plugins) abort
try
call denops#plugin#load(
\ name,
\ [plugin.rtp, 'denops', name, 'main.ts']->join(s:sep),
\ [plugin.rtp, 'denops', name, 'main.ts']->join(sep),
\)
catch /^Vim\%((\a\+)\)\=:E117:/
" Fallback to `register` for backward compatibility
silent! call denops#plugin#register(
\ name,
\ [plugin.rtp, 'denops', name, 'main.ts']->join(s:sep),
\ [plugin.rtp, 'denops', name, 'main.ts']->join(sep),
\ #{ mode: 'skip' },
\)
endtry
Expand Down

0 comments on commit 7329dfc

Please sign in to comment.