diff --git a/CHANGES b/CHANGES index dbde63043..2c329d00a 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ CHANGES IN FLTK 1.3.5 RELEASED: ??? ?? 2017 Bug fixes and other improvements + - Fix Fl_Text_Editor overstrike mode (STR #3463). - More consistent and optimized "gleam" scheme box drawing. - Fix a MinGW build error with new MinGW versions as of Feb 2018 (undefined S_OK and __FD_ISSET), see STR #3454. diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 59582b148..6a4d749c9 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1025,7 +1025,7 @@ void Fl_Text_Display::overstrike(const char* text) { /* find which characters to remove, and if necessary generate additional padding to make up for removed control characters at the end */ indent = startIndent; - for ( p = startPos; ; p=buffer()->next_char(p) ) { + for ( p = startPos; ; p = buf->next_char(p) ) { if ( p == buf->length() ) break; ch = buf->char_at( p ); @@ -1033,11 +1033,11 @@ void Fl_Text_Display::overstrike(const char* text) { break; indent++; if ( indent == endIndent ) { - p++; + p = buf->next_char(p); break; } else if ( indent > endIndent ) { if ( ch != '\t' ) { - p++; + p = buf->next_char(p); paddedText = new char [ textLen + FL_TEXT_MAX_EXP_CHAR_LEN + 1 ]; strcpy( paddedText, text ); for ( i = 0; i < indent - endIndent; i++ )