diff --git a/mail_menu.c b/mail_menu.c index d42d598..68e51e3 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -419,11 +419,14 @@ char *editor(int socket, struct user_record *user, char *quote, char *from) { int z; char *tagline; + char next_line_buffer[80]; + + memset(next_line_buffer, 0, 80); if (quote != NULL) { + //wrap(quote, 65); for (i=0;i 15;i--) { + if (linebuffer[i] == ' ') { + linebuffer[i] = '\0'; + strcpy(next_line_buffer, &linebuffer[i+1]); + sprintf(prompt, "\e[%dD\e[0K", 70 - i); + s_putstring(socket, prompt); + break; + } + } + } + + if (linebuffer[0] == '/' && strlen(linebuffer) == 2) { if (toupper(linebuffer[1]) == 'S') { for (i=0;i