]> code.citadel.org Git - citadel.git/blobdiff - citadel/messages.c
* Support for Ctrl-W to erase a word when editing or at a prompt
[citadel.git] / citadel / messages.c
index 707b9dc3da17370574cafd261361cffbd17355aa..e740634fca9c3069e0161c4cb71331d3b5c81861 100644 (file)
@@ -271,6 +271,13 @@ void citedit(FILE * fp)
                                scr_putc(32);
                                scr_putc(8);
                        }
+               } else if (a == 23) {
+                       do {
+                               wordbuf[strlen(wordbuf) - 1] = 0;
+                               scr_putc(8);
+                               scr_putc(32);
+                               scr_putc(8);
+                       } while (strlen(wordbuf) && wordbuf[strlen(wordbuf) - 1] != ' ');
                } else if (a == 13) {
                        scr_printf("\n");
                        if (strlen(wordbuf) == 0)