Code

screen_keydef: document delete_key
[ncmpc.git] / src / command.c
index 76e84dc1c897c244335454d1dc7cf4078e9e9c81..656bb18e389db0bd89a1389be818a861d2a7a3e1 100644 (file)
@@ -241,8 +241,10 @@ static command_definition_t cmds[] = {
          N_("Interrupt action") },
        { {'u', 0, 0 }, 0, CMD_LYRICS_UPDATE, "lyrics-update",
          N_("Update Lyrics") },
-       { {'e', 0, 0 }, 0, CMD_LYRICS_EDIT, "lyrics-edit",
-         N_("Edit Lyrics") },
+       /* this command may move out of #ifdef ENABLE_LYRICS_SCREEN
+          at some point */
+       { {'e', 0, 0 }, 0, CMD_EDIT, "edit",
+         N_("Edit the current item") },
 #endif
 
 #ifdef ENABLE_OUTPUTS_SCREEN
@@ -328,28 +330,28 @@ command_dump_keys(void)
 {
        for (int i = 0; cmds[i].description; i++)
                if (cmds[i].command != CMD_NONE)
-                       printf(" %20s : %s\n", get_key_names(cmds[i].command,1),cmds[i].name);
+                       printf(" %20s : %s\n",
+                              get_key_names(cmds[i].command, true),
+                              cmds[i].name);
 }
 
 #ifndef NCMPC_MINI
 
-static int
+static void
 set_key_flags(command_definition_t *cp, command_t command, int flags)
 {
        for (int i = 0; cp[i].name; i++) {
                if (cp[i].command == command) {
                        cp[i].flags |= flags;
-                       return 0;
+                       break;
                }
        }
-
-       return 1;
 }
 
 #endif
 
 const char *
-get_key_names(command_t command, int all)
+get_key_names(command_t command, bool all)
 {
        for (int i = 0; cmds[i].description; i++) {
                if (cmds[i].command == command) {
@@ -530,4 +532,4 @@ write_key_bindings(FILE *f, int flags)
        return ferror(f);
 }
 
-#endif
+#endif /* NCMPC_MINI */