config: ignore “self” when detecting key binding collisions

Previously, foot would not accept the following:

  [key-bindings]
  minimize=Escape
  minimize=Escape

Now it does. I.e. key combos in the action being updated are ignored
when detecting collisions.

The example above is contrived; a real world example could be to
remove certain combos from an action with multiple combos; perhaps to
free up a combo for another action. Example:

  [search-bindings]
  cancel=Escape

This would previously cause an error since `cancel=Control+g Escape`
by default.

Closes #233
This commit is contained in:
Daniel Eklöf 2020-12-05 11:21:17 +01:00
parent a58557af30
commit 5e46672cf4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 17 additions and 4 deletions

View file

@ -96,6 +96,11 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
### Deprecated
### Removed
### Fixed
* Error when re-assigning a default key binding
(https://codeberg.org/dnkl/foot/issues/233).
### Security