From 4bed63cd25fb9ce33e17cecbce9a43422c9ddb53 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 1 Oct 2017 21:56:02 +1000 Subject: [PATCH] Longer input lines and linewrapping --- src/chat_system.c | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/src/chat_system.c b/src/chat_system.c index 9d28814..8d677f1 100644 --- a/src/chat_system.c +++ b/src/chat_system.c @@ -26,7 +26,7 @@ extern int usertimeout; struct chat_msg { char nick[16]; char bbstag[16]; - char msg[256]; + char msg[512]; }; static int jsoneq(const char *json, jsmntok_t *tok, const char *s) { @@ -38,7 +38,7 @@ static int jsoneq(const char *json, jsmntok_t *tok, const char *s) { } static char *encapsulate_quote(char *in) { - char out[160]; + char out[512]; int i; int j = 0; for (i=0;i 0) { + screenbuffer[line_at][last_space] = '\0'; + } scroll_up(); row_at = 0; + for (i=last_space+1;i 0) { + screenbuffer[line_at][last_space] = '\0'; + } + line_at++; row_at = 0; - line_at++; + for (i=last_space+1;i 79) { + s_printf("\e[24;1f<%s\e[K", &inputbuffer[strlen(inputbuffer) - 78]); + } else { + s_printf("\e[24;1f%s\e[K", inputbuffer); + } } } }