mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
Fix Fl_Text_Editor overstrike mode (STR #3463).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -3,6 +3,7 @@ CHANGES IN FLTK 1.3.5 RELEASED: ??? ?? 2017
|
|||||||
|
|
||||||
Bug fixes and other improvements
|
Bug fixes and other improvements
|
||||||
|
|
||||||
|
- Fix Fl_Text_Editor overstrike mode (STR #3463).
|
||||||
- More consistent and optimized "gleam" scheme box drawing.
|
- More consistent and optimized "gleam" scheme box drawing.
|
||||||
- Fix a MinGW build error with new MinGW versions as of Feb 2018
|
- Fix a MinGW build error with new MinGW versions as of Feb 2018
|
||||||
(undefined S_OK and __FD_ISSET), see STR #3454.
|
(undefined S_OK and __FD_ISSET), see STR #3454.
|
||||||
|
|||||||
@@ -1025,7 +1025,7 @@ void Fl_Text_Display::overstrike(const char* text) {
|
|||||||
/* find which characters to remove, and if necessary generate additional
|
/* find which characters to remove, and if necessary generate additional
|
||||||
padding to make up for removed control characters at the end */
|
padding to make up for removed control characters at the end */
|
||||||
indent = startIndent;
|
indent = startIndent;
|
||||||
for ( p = startPos; ; p=buffer()->next_char(p) ) {
|
for ( p = startPos; ; p = buf->next_char(p) ) {
|
||||||
if ( p == buf->length() )
|
if ( p == buf->length() )
|
||||||
break;
|
break;
|
||||||
ch = buf->char_at( p );
|
ch = buf->char_at( p );
|
||||||
@@ -1033,11 +1033,11 @@ void Fl_Text_Display::overstrike(const char* text) {
|
|||||||
break;
|
break;
|
||||||
indent++;
|
indent++;
|
||||||
if ( indent == endIndent ) {
|
if ( indent == endIndent ) {
|
||||||
p++;
|
p = buf->next_char(p);
|
||||||
break;
|
break;
|
||||||
} else if ( indent > endIndent ) {
|
} else if ( indent > endIndent ) {
|
||||||
if ( ch != '\t' ) {
|
if ( ch != '\t' ) {
|
||||||
p++;
|
p = buf->next_char(p);
|
||||||
paddedText = new char [ textLen + FL_TEXT_MAX_EXP_CHAR_LEN + 1 ];
|
paddedText = new char [ textLen + FL_TEXT_MAX_EXP_CHAR_LEN + 1 ];
|
||||||
strcpy( paddedText, text );
|
strcpy( paddedText, text );
|
||||||
for ( i = 0; i < indent - endIndent; i++ )
|
for ( i = 0; i < indent - endIndent; i++ )
|
||||||
|
|||||||
Reference in New Issue
Block a user