martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.19k stars 259 forks source link

vis-lua: raise an error when mapping to invalid handler types #1125

Closed devkarthin closed 9 months ago

devkarthin commented 10 months ago

When passing an invalid handler type (such as nil) to Vis:map/Window:map, the editor would map the key to an empty (zeroed) KeyBinding that would cause itself to become unresponsive when processing the corresponding key.

mcepl commented 9 months ago

Is there some way how to add a test for this?

devkarthin commented 9 months ago

Is there some way how to add a test for this?

Could you clarify what you mean by that?

mcepl commented 9 months ago

Is there some way how to add a test for this?

Could you clarify what you mean by that?

You know we have the test suite in https://github.com/martanne/vis-test/, right?

rnpnr commented 9 months ago

Thanks for the patch!