Skip to content

Commit

Permalink
Fix sep
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jan 1, 2024
1 parent 7329dfc commit f41352f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoload/dein/autoload.vim
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const s:sep = has('win32') ? '\' : '/'
function! dein#autoload#_source(plugins) abort
let plugins = dein#util#_convert2list(a:plugins)
if plugins->empty()
Expand Down Expand Up @@ -67,7 +68,6 @@ 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 @@ -77,13 +77,13 @@ function! dein#autoload#_source(plugins) abort
try
call denops#plugin#load(
\ name,
\ [plugin.rtp, 'denops', name, 'main.ts']->join(sep),
\ [plugin.rtp, 'denops', name, 'main.ts']->join(s:sep),
\)
catch /^Vim\%((\a\+)\)\=:E117:/
" Fallback to `register` for backward compatibility
silent! call denops#plugin#register(
\ name,
\ [plugin.rtp, 'denops', name, 'main.ts']->join(sep),
\ [plugin.rtp, 'denops', name, 'main.ts']->join(s:sep),
\ #{ mode: 'skip' },
\)
endtry
Expand Down

0 comments on commit f41352f

Please sign in to comment.