diff --git a/edit.c b/edit.c index e843add..69be9d0 100644 --- a/edit.c +++ b/edit.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.79 2007/01/15 02:11:34 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.80 2007/01/15 02:14:02 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -2523,11 +2523,9 @@ x_print(int prefix, int key) { int f = x_tab[prefix][key]; - if (prefix == 1) - shprintf("%s", x_mapout(MKCTRL('['))); - if (prefix == 2) - shprintf("%s", x_mapout(MKCTRL('X'))); - shprintf("%s%s = ", x_mapout(key), (f & 0x80) ? "~" : ""); + shprintf("%s%s%s = ", (prefix == 1) ? x_mapout(MKCTRL('[')) : + ((prefix == 2) ? x_mapout(MKCTRL('X')) : ""), x_mapout(key), + (f & 0x80) ? "~" : ""); if ((f & 0x7F) != XFUNC_ins_string) shprintf("%s\n", x_ftab[f & 0x7F].xf_name); else