display_right_buffer(rdl, 1);
break;
+ case CMDLINE_KEY_META_D:
+ while (! CIRBUF_IS_EMPTY(&rdl->right) && isblank2(cirbuf_get_head(&rdl->right)))
+ cirbuf_del_head(&rdl->right);
+ while (! CIRBUF_IS_EMPTY(&rdl->right) && !isblank2(cirbuf_get_head(&rdl->right)))
+ cirbuf_del_head(&rdl->right);
+ display_right_buffer(rdl, 1);
+ break;
+
case CMDLINE_KEY_SUPPR:
case CMDLINE_KEY_CTRL_D:
if (cmd == CMDLINE_KEY_CTRL_D &&
#ifndef NO_RDLINE_HISTORY
case CMDLINE_KEY_UP_ARR:
+ case CMDLINE_KEY_CTRL_P:
if (rdl->history_cur_line == 0) {
rdline_remove_first_history_item(rdl);
}
break;
case CMDLINE_KEY_DOWN_ARR:
+ case CMDLINE_KEY_CTRL_N:
if (rdl->history_cur_line - 1 < 0)
break;
struct rdline;
-typedef void (rdline_write_char_t)(struct rdline *rdl, char);
+typedef int (rdline_write_char_t)(struct rdline *rdl, char);
typedef void (rdline_validate_t)(struct rdline *rdl,
const char *buf, unsigned int size);
typedef int (rdline_complete_t)(struct rdline *rdl, const char *buf,
#define CMDLINE_KEY_WRIGHT 20
#define CMDLINE_KEY_HELP 21
#define CMDLINE_KEY_CTRL_W 22
+#define CMDLINE_KEY_CTRL_P 23
+#define CMDLINE_KEY_CTRL_N 24
+#define CMDLINE_KEY_META_D 25
extern const char *cmdline_vt100_commands[];