summaryrefslogtreecommitdiff
path: root/src/cmd.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-07-31 22:17:47 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-07-31 22:17:47 +0200
commit26c176c839a749a8ca2b9530909248a64ef429aa (patch)
tree541d37c3d115d8b362c0f8d4f78d1f058bb94dbd /src/cmd.c
parent54fb1f3810de177531353af3af58a7ea3de0ca9a (diff)
use KEYCODE_REL instead of 0x00
Diffstat (limited to 'src/cmd.c')
-rw-r--r--src/cmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd.c b/src/cmd.c
index 5fdc59f..9143a3e 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -11,7 +11,6 @@
enum {
- REL = 0x00,
ESC = 0x1b,
DEL = 0x7f,
};
@@ -140,7 +139,7 @@ static int editor_input(struct mbuf *mb, char key,
*del = true;
return re_hprintf(pf, "\nCancel\n");
- case REL:
+ case KEYCODE_REL:
break;
case '\n':
@@ -274,7 +273,7 @@ int cmd_process(struct cmd_ctx **ctxp, char key, struct re_printf *pf,
/* are we in edit-mode? */
if (ctxp && *ctxp) {
- if (key == REL)
+ if (key == KEYCODE_REL)
return 0;
return cmd_process_edit(ctxp, key, pf, data);
@@ -306,7 +305,7 @@ int cmd_process(struct cmd_ctx **ctxp, char key, struct re_printf *pf,
return cmd->h(pf, &arg);
}
- if (key == REL)
+ if (key == KEYCODE_REL)
return 0;
return cmd_print(pf, NULL);