diff --git a/README.md b/README.md index 8f14049c..dc752af1 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ Description: https://github.com/olikraus/u8g2/wiki Issue Tracker: https://github.com/olikraus/u8g2/issues -Download (2.23.1): https://github.com/olikraus/U8g2_Arduino/archive/master.zip +Download (2.23.2): https://github.com/olikraus/U8g2_Arduino/archive/master.zip diff --git a/library.properties b/library.properties index 12ff76ba..8d216c44 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=U8g2 -version=2.23.1 +version=2.23.2 author=oliver maintainer=oliver sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1701, ST7565, ST7567, ST7588, ST75256, NT7534, IST3020, ST7920, LD7032, KS0108, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel. diff --git a/src/clib/u8log.c b/src/clib/u8log.c index d44f5fd1..53e26306 100644 --- a/src/clib/u8log.c +++ b/src/clib/u8log.c @@ -86,6 +86,8 @@ static void u8log_scroll_up(u8log_t *u8log) if ( u8log->is_redraw_line_for_each_char ) u8log->is_redraw_all = 1; + else + u8log->is_redraw_all_required_for_next_nl = 1; } /* @@ -93,6 +95,7 @@ static void u8log_scroll_up(u8log_t *u8log) */ static void u8log_cursor_on_screen(u8log_t *u8log) { + //printf("u8log_cursor_on_screen, cursor_y=%d\n", u8log->cursor_y); if ( u8log->cursor_x >= u8log->width ) { u8log->cursor_x = 0; @@ -139,6 +142,9 @@ void u8log_write_char(u8log_t *u8log, uint8_t c) case '\n': // 10 u8log->is_redraw_line = 1; u8log->redraw_line = u8log->cursor_y; + if ( u8log->is_redraw_all_required_for_next_nl ) + u8log->is_redraw_all = 1; + u8log->is_redraw_all_required_for_next_nl = 0; u8log->cursor_y++; u8log->cursor_x = 0; break; diff --git a/src/clib/u8x8.h b/src/clib/u8x8.h index 04fcda3a..4b77784b 100644 --- a/src/clib/u8x8.h +++ b/src/clib/u8x8.h @@ -397,6 +397,7 @@ struct u8log_struct uint8_t redraw_line; /* redraw specific line if is_redraw_line is not 0 */ uint8_t is_redraw_line; uint8_t is_redraw_all; + uint8_t is_redraw_all_required_for_next_nl; /* in nl mode, redraw all instead of current line */ }; typedef struct u8log_struct u8log_t;