Skip to content

Commit

Permalink
Merge pull request #3 from kuuote/fix-dpp_source_source
Browse files Browse the repository at this point in the history
fix: `dpp#source#_source` is broken
  • Loading branch information
Shougo committed Oct 14, 2023
2 parents f082b8c + bd358a8 commit f85b8ce
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions autoload/dpp/source.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function dpp#autoload#_source(plugins) abort
function dpp#source#_source(plugins) abort
let plugins = dpp#util#_convert2list(a:plugins)
if plugins->empty()
return []
Expand All @@ -10,7 +10,7 @@ function dpp#autoload#_source(plugins) abort
endif

let rtps = dpp#util#_split_rtp(&runtimepath)
const index = rtps->index(g:dpp#_runtime_path)
const index = rtps->index(dpp#util#_get_runtime_path())
if index < 0
return []
endif
Expand Down Expand Up @@ -200,3 +200,19 @@ function s:is_reset_ftplugin(plugins) abort

return 0
endfunction

function s:reset_ftplugin() abort
const filetype_state = 'filetype'->execute()

if 'b:did_indent'->exists() || 'b:did_ftplugin'->exists()
filetype plugin indent off
endif

if filetype_state =~# 'plugin:ON'
silent! filetype plugin on
endif

if filetype_state =~# 'indent:ON'
silent! filetype indent on
endif
endfunction

0 comments on commit f85b8ce

Please sign in to comment.