diff --git a/src/rcfile.c b/src/rcfile.c index 8076c484..b0c58684 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -468,11 +468,13 @@ void parse_binding(char *ptr, bool dobind) } } - /* Now find and delete any existing same shortcut in the menu(s). */ + if (!dobind) { + /* Find and wipe the given shortcut from the given menu. */ for (s = sclist; s != NULL; s = s->next) { if ((s->menus & menu) && !strcmp(s->keystr, keycopy)) s->menus &= ~menu; } + } if (dobind) { #ifndef NANO_TINY