Close key binding window when reassigning the same key
This allows for canceling a key reassignment. We cannot use a static key here since every key could potentially be used in a binding. Instead, just cancel if we are trying to reassign a key that has already been used for that action before. Signed-off-by: Michael Smith <crazedpsyc@mail4us.net> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
d5cbe794e9
commit
ce22b13a4d
@ -980,6 +980,12 @@ void custom_keys_config(void)
|
||||
} else
|
||||
not_recognized = 0;
|
||||
|
||||
/* Is the binding used by this action already? If so, just end the reassignment */
|
||||
if (selrow == keys_get_action(keyval)) {
|
||||
delwin(grabwin);
|
||||
break;
|
||||
}
|
||||
|
||||
used = keys_assign_binding(keyval, selrow);
|
||||
if (used) {
|
||||
enum key action;
|
||||
|
Loading…
x
Reference in New Issue
Block a user