diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2007-05-01 21:09:39 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2007-05-01 21:09:39 +0000 |
| commit | 47e802218d5645bb8a4320037f32dcc82b265ef8 (patch) | |
| tree | d6561e74ae662124c4ea5bc3f7d738ab8420fc44 /src/Fl_Text_Display.cxx | |
| parent | 82195b6d686255fd432c161bc6963857b09c1b54 (diff) | |
Fixed endless loop in Fl_Text_Display (STR #1655)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5793 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index efc2a5196..26bfd45b4 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -174,6 +174,7 @@ void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) { if ( buf == mBuffer) return; if ( mBuffer != 0 ) { buffer_modified_cb( 0, 0, mBuffer->length(), 0, 0, this ); + mNBufferLines = 0; mBuffer->remove_modify_callback( buffer_modified_cb, this ); mBuffer->remove_predelete_callback( buffer_predelete_cb, this ); } @@ -1150,7 +1151,7 @@ int Fl_Text_Display::rewind_lines(int startPos, int nLines) { while (true) { lineStart = buf->line_start(pos); wrapped_line_counter(buf, lineStart, pos, INT_MAX, - true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); + true, 0, &retPos, &retLines, &retLineStart, &retLineEnd, false); if (retLines > nLines) return skip_lines(lineStart, retLines-nLines, true); |
