Showing a key only when it was rebound.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5562 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Benno Schulenberg 2016-01-14 14:44:11 +00:00
parent 33fb1746dd
commit 63370954bd
2 changed files with 5 additions and 4 deletions

View File

@ -6,6 +6,7 @@
some wrappings and whitespace. some wrappings and whitespace.
* src/proto.h: Delete two duplicate declarations. * src/proto.h: Delete two duplicate declarations.
* src/rcfile.c (check_bad_binding): Elide this unneeded function. * src/rcfile.c (check_bad_binding): Elide this unneeded function.
* src/rcfile.c (parse_binding): Show key only when it was rebound.
2016-01-13 Benno Schulenberg <bensberg@justemail.net> 2016-01-13 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (save_poshistory): Reduce the indentation. * src/files.c (save_poshistory): Reduce the indentation.

View File

@ -525,10 +525,6 @@ void parse_binding(char *ptr, bool dobind)
newsc->menus = menu; newsc->menus = menu;
newsc->type = strtokeytype(newsc->keystr); newsc->type = strtokeytype(newsc->keystr);
assign_keyinfo(newsc); assign_keyinfo(newsc);
#ifdef DEBUG
fprintf(stderr, "s->keystr = \"%s\"\n", newsc->keystr);
fprintf(stderr, "s->seq = \"%d\"\n", newsc->seq);
#endif
/* Do not allow rebinding the equivalent of the Escape key. */ /* Do not allow rebinding the equivalent of the Escape key. */
if (newsc->type == META && newsc->seq == 91) { if (newsc->type == META && newsc->seq == 91) {
@ -536,6 +532,10 @@ void parse_binding(char *ptr, bool dobind)
free(newsc); free(newsc);
goto free_copy; goto free_copy;
} }
#ifdef DEBUG
fprintf(stderr, "s->keystr = \"%s\"\n", newsc->keystr);
fprintf(stderr, "s->seq = \"%d\"\n", newsc->seq);
#endif
} }
/* Now find and delete any existing same shortcut in the menu(s). */ /* Now find and delete any existing same shortcut in the menu(s). */