1
0
Fork 0

[kbdbind] Assign values to default_keybinding every time. Refs #152

This commit is contained in:
Witold Filipczyk 2022-04-23 19:42:15 +02:00
parent b9a648059b
commit 77c98ab2a4
1 changed files with 5 additions and 7 deletions

View File

@ -807,15 +807,13 @@ static struct default_kb *default_keybindings[] = {
static int
keybinding_is_default(struct keybinding *keybinding)
{
static struct default_kb default_keybinding = {
{
keybinding->kbd.key,
keybinding->kbd.modifier
},
keybinding->action_id
};
static struct default_kb default_keybinding;
struct default_kb *pos;
default_keybinding.kbd.key = keybinding->kbd.key;
default_keybinding.kbd.modifier = keybinding->kbd.modifier;
default_keybinding.action_id = keybinding->action_id;
for (pos = default_keybindings[keybinding->keymap_id]; pos->kbd.key; pos++)
if (!memcmp(&default_keybinding, pos, sizeof(default_keybinding)))
return 1;