From 9583ea4b68aa1d0ae4ea9e0af352658ab1507217 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 22 Apr 2016 19:51:46 +1000 Subject: [PATCH] More work on ansi display --- mail_menu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index 3b63f80..f12a8ed 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -826,12 +826,12 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh s_putstring(socket, buffer); } else if (body[z] == 'A') { j = atoi(&body[ansi + 2]); - if (j == 0) { + if (j == 0 && ansi + 3 == z) { j = 1; } for (i=0;i= 0) { - s_putstring(socket, "\e[1A"); + s_putstring(socket, "\e[A"); lines--; } else { break; @@ -839,12 +839,12 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh } } else if (body[z] == 'C') { j = atoi(&body[ansi + 2]); - if (j == 0) { + if (j == 0 && ansi + 3 == z) { j = 1; } for (i=0;i= 0) { - s_putstring(socket, "\e[1D"); + s_putstring(socket, "\e[D"); chars--; } else { break;