diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-04-18 13:20:15 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-04-18 13:20:15 +0000 |
| commit | c79f82edd1c32308b4a2176b002975381b7478de (patch) | |
| tree | f1db326762faee493bf0694c4b88fcf6de45e4ac /src/Fl_Text_Display.cxx | |
| parent | 6ada3601743366ca88b239fc23a10ccad08d75e8 (diff) | |
Fix Fl_Text_Editor overstrike mode (STR #3463).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 8aa9f5c6d..0d89237b6 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1010,7 +1010,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 ); @@ -1018,11 +1018,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++ ) |
