Skip to content

Commit

Permalink
Use method
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Mar 24, 2024
1 parent 15d30fc commit 3ac771d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions autoload/dpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function dpp#make_state(
\ config_path=g:->get('dpp#_config_path', ''),
\ name=g:->get('dpp#_name', v:progname->fnamemodify(':r')),
\ ) abort
const base_path = dpp#util#_expand(a:base_path)
const config_path = dpp#util#_expand(a:config_path)
const base_path = a:base_path->dpp#util#_expand()
const config_path = a:config_path->dpp#util#_expand()

if base_path ==# ''
call dpp#util#_error('dpp#make_state() base_path is empty.')
Expand Down
6 changes: 4 additions & 2 deletions autoload/dpp/source.vim
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ function s:source_plugin(rtps, index, plugin, sourced) abort
" NOTE: on_source must be sourced before depends
for source in dpp#util#_get_lazy_plugins()
\ ->filter({ _, val ->
\ dpp#util#_convert2list(val->get('on_source', []))
\ val->get('on_source', [])
\ ->dpp#util#_convert2list()
\ ->index(a:plugin.name) >= 0
\ })
if s:source_plugin(a:rtps, index, source, a:sourced)
Expand Down Expand Up @@ -186,7 +187,8 @@ function s:source_plugin(rtps, index, plugin, sourced) abort
" Load on_post_source
for source in dpp#util#_get_lazy_plugins()
\ ->filter({ _, val ->
\ dpp#util#_convert2list(val->get('on_post_source', []))
\ val->get('on_post_source', [])
\ ->dpp#util#_convert2list()
\ ->index(a:plugin.name) >= 0
\ })
if s:source_plugin(a:rtps, index, source, a:sourced)
Expand Down

0 comments on commit 3ac771d

Please sign in to comment.