liuchengxu / vim-which-key

:tulip: Vim plugin that shows keybindings in popup
https://liuchengxu.github.io/vim-which-key/
MIT License
1.93k stars 65 forks source link

Fix issue when using dictionary function #247

Open asheidan opened 1 year ago

asheidan commented 1 year ago

Previously, after the function was evaluated, the rest of the loop merging the dicts containing the descriptions continued using V instead of the return value of the function.

That could probably cause multiple issues, but the one guaranteed issue was when the returned dictionary contained only plain descriptions and no function (plain string instead of list).

If you are using a dictionary function and see single-letter-descriptions where the letter is the second letter of the description, this probably fixes it.

I'm using this fix myself, but I'm open to other ways of solving this issue.