tani / vim-jetpack

The lightning-fast plugin manager, alternative to vim-plug
https://gist.asciidoctor.org/?github-tani/vim-jetpack/main//README.adoc&source-highlighter=highlightjs
MIT License
317 stars 31 forks source link

FIX: plugin declaration can be overwitten. #127

Closed niw closed 10 months ago

niw commented 10 months ago

Problems

When jetpack#add is called with same name's plugin, it checks against a:plugin that may inclues GitHub user name such as tani/jetpack, but key for s:declared_packages is plugin name such as jetpack, which is inconsistent.

Due to this issue, when the Lua API is used with requires, for example, it calls same plugin name to use(req) call at line around 853, which may override already declared plugin.

Solution

Use plugin name always for s:declared_packages. This patch also includes minor indent fix.

tani commented 10 months ago

Thank you so much!