From af5a3a64ed6f8cb704507ad2d37f20b89fbcbc00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Wed, 9 Aug 2017 20:45:22 +0200 Subject: [PATCH] fix bug and undo regression with cursor restore --- user/ansi_parser_callbacks.c | 2 +- user/screen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {