diff --git a/src/editline.c b/src/editline.c index e48602c..6d82b84 100644 --- a/src/editline.c +++ b/src/editline.c @@ -930,6 +930,20 @@ static el_status_t meta(void) if (c == '[' || c == 'O') { switch (tty_get()) { case EOF: return CSeof; + case '1': + { + char seq[4] = { 0 }; + + for (c = 0; c < 3; c++) + seq[c] = tty_get(); + + if (!strncmp(seq, ";5C", 3)) + return fd_word(); /* Ctrl+Right */ + if (!strncmp(seq, ";5D", 3)) + return bk_word(); /* Ctrl+Left */ + + break; + } case '2': tty_get(); return CSstay; /* Insert */ case '3': tty_get(); return del_char(); /* Delete */ case '5': tty_get(); return CSstay; /* PgUp */