hkupty / impromptu.nvim

Create prompts fast and easy
MIT License
39 stars 1 forks source link

Key duplicates #24

Open KillTheMule opened 5 years ago

KillTheMule commented 5 years ago

So, I have pretty extensive menus, and one or two of them are so large that two menu items get assigned the same key. That's quite a bit of a problem, but I only noticed some time during debugging something else. I understand you can't provide sensible choices (or different choices at all) for all menu sizes, but could you maybe throw an error if that happens so it gets noticed?

hkupty commented 5 years ago

I'll double check. The default behavior was to pick any unassigned key. The range of possibilities would be around 80 entries.

It should never repeat. What should happen instead is that the first missing key would be nil, thus erroring.

I'll investigate further and I think this calls up for setting a test infrastructure to avoid regressions.

KillTheMule commented 5 years ago

... and I think this calls up for setting a test infrastructure to avoid regressions.

I once wrote a blog post about that. If you're interested, I can set this up.