From 47e802218d5645bb8a4320037f32dcc82b265ef8 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 1 May 2007 21:09:39 +0000 Subject: 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 --- CHANGES | 1 + src/Fl_Text_Display.cxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 05f951dec..d90f084c8 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ CHANGES IN FLTK 1.1.8 - Documentation fixes (STR #1454, STR #1455, STR #1456, STR #1457, STR #1458, STR #1460, STR #1481, STR #1578, STR #1639, STR #1645, STR #1644) + - Fixed endless loop in Fl_Text_Display (STR #1655) - Allowing shortcuts in Tabs (STR #1652) - Fixed Makefile "make clean" (STR #1642, STR #1643, STR #1641) - The sample RPM spec file now enables large file support 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); -- cgit v1.2.3