diff --git a/user/ansi_parser_callbacks.c b/user/ansi_parser_callbacks.c index 15048b3..0aa64ea 100644 --- a/user/ansi_parser_callbacks.c +++ b/user/ansi_parser_callbacks.c @@ -305,7 +305,7 @@ void ICACHE_FLASH_ATTR apars_handle_shortCode(char c) screen_cursor_save(true); break; case '8': // restore cursor + attrs - screen_cursor_restore(false); + screen_cursor_restore(true); break; case 'E': // same as CR LF screen_cursor_move(1, 0, false); diff --git a/user/screen.c b/user/screen.c index 980ca03..8c19a6d 100644 --- a/user/screen.c +++ b/user/screen.c @@ -243,7 +243,7 @@ screen_clear_line(ClearMode mode) void ICACHE_FLASH_ATTR screen_clear_in_line(unsigned int count) { - if (cursor.x + count > W) { + if (cursor.x + count >= W) { screen_clear_line(CLEAR_FROM_CURSOR); } else {