config: remove replaced/removed key bindings, instead of marking as ‘unused’

Instead of keeping removed/replaced key bindings in the key binding
array (marked as ‘unused’), remove them, by compacting the array.

The invariant is thus that there should be *no* entries in the key
binding list with the `BIND_ACTION_NONE` for action.

Add code to debug builds that verifies this, plus a unit test.

Closes #614
This commit is contained in:
Daniel Eklöf 2021-06-29 18:08:15 +02:00
parent cf46acc68f
commit 149c52bd44
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 134 additions and 32 deletions

View file

@ -43,6 +43,8 @@
### Fixed
* Grapheme cluster state being reset between codepoints.
* Regression: custom URL key bindings not working
(https://codeberg.org/dnkl/foot/issues/614).
### Security