Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug that caused incorrect parsing when an unrelated fold exists in a fold that represents a hook or ftplugin. #515

Merged
merged 4 commits into from
May 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added concatenation when there are scripts with the same hook_name.
  • Loading branch information
kurokoji committed May 12, 2024
commit c719695bedc453a5cb8ef030dc59ef0a6bce28ed
12 changes: 10 additions & 2 deletions autoload/dein/parse.vim
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,11 @@ function! dein#parse#_hooks_file(filename) abort
\ || hook_name->stridx('lua_done_') == 0
\ || hook_name->stridx('lua_post_') == 0

let options[hook_name] = cur_lines->join("\n")
if !options->has_key(hook_name)
let options[hook_name] = ""
endif

let options[hook_name] ..= cur_lines->join("\n")
else
if hook_name == ''
continue
Expand All @@ -538,7 +542,11 @@ function! dein#parse#_hooks_file(filename) abort
let options['ftplugin'] = {}
endif

let options['ftplugin'][hook_name] = cur_lines->join("\n")
if !(options.ftplugin->has_key(hook_name))
let options.ftplugin[hook_name] = ""
endif

let options['ftplugin'][hook_name] ..= cur_lines->join("\n")
endif
endfor

Expand Down
Loading