fix bug and undo regression with cursor restore

pull/111/merge
Ondřej Hruška 7 years ago
parent 7b94eef448
commit af5a3a64ed
  1. 2
      user/ansi_parser_callbacks.c
  2. 2
      user/screen.c

@ -305,7 +305,7 @@ void ICACHE_FLASH_ATTR apars_handle_shortCode(char c)
screen_cursor_save(true); screen_cursor_save(true);
break; break;
case '8': // restore cursor + attrs case '8': // restore cursor + attrs
screen_cursor_restore(false); screen_cursor_restore(true);
break; break;
case 'E': // same as CR LF case 'E': // same as CR LF
screen_cursor_move(1, 0, false); screen_cursor_move(1, 0, false);

@ -243,7 +243,7 @@ screen_clear_line(ClearMode mode)
void ICACHE_FLASH_ATTR void ICACHE_FLASH_ATTR
screen_clear_in_line(unsigned int count) screen_clear_in_line(unsigned int count)
{ {
if (cursor.x + count > W) { if (cursor.x + count >= W) {
screen_clear_line(CLEAR_FROM_CURSOR); screen_clear_line(CLEAR_FROM_CURSOR);
} }
else { else {

Loading…
Cancel
Save