diff --git a/src/curses/ui_manager.c b/src/curses/ui_manager.c index 3b07d82..15a89d1 100644 --- a/src/curses/ui_manager.c +++ b/src/curses/ui_manager.c @@ -448,12 +448,15 @@ draw_message_pos(WINDOW *win, sip_msg_t *msg, int starting) cur_line =payload + i + 1; // Move to the next line if line is filled or a we reach a line break - if (column > width || payload[i] == '\n') { + if (column > width - 1 || payload[i] == '\n') { line++; column = 0; - continue; } + // No need to print new line characters + if (payload[i] == '\n') + continue; + // Put next character in position if (isascii(payload[i])) { mvwaddch(win, line, column++, payload[i]);