Fix infinite loop bug in Fl_Text_Display::resize()...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2599 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
5ab5efff11
commit
36e719a0b2
2
CHANGES
2
CHANGES
@ -1,5 +1,7 @@
|
||||
CHANGES IN FLTK 1.1.0
|
||||
|
||||
- Fl_Text_Display::resize() could go into an infinite
|
||||
loop if the buffer is emptied.
|
||||
- Fl::handle() didn't pass FL_RELEASE events to the
|
||||
grab() widget if pushed() was set (for proper menu
|
||||
handling...)
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Text_Display.cxx,v 1.12.2.26 2002/08/15 17:26:46 easysw Exp $"
|
||||
// "$Id: Fl_Text_Display.cxx,v 1.12.2.27 2002/08/20 17:12:19 easysw Exp $"
|
||||
//
|
||||
// Copyright 2001-2002 by Bill Spitzak and others.
|
||||
// Original code Copyright Mark Edel. Permission to distribute under
|
||||
@ -301,7 +301,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) {
|
||||
scroll_(mTopLineNumHint, mHorizOffsetHint);
|
||||
|
||||
// everything will fit in the viewport
|
||||
if (mNBufferLines < mNVisibleLines)
|
||||
if (mNBufferLines < mNVisibleLines || mBuffer == NULL || mBuffer->length() == 0)
|
||||
scroll_(1, mHorizOffset);
|
||||
/* if empty lines become visible, there may be an opportunity to
|
||||
display more text by scrolling down */
|
||||
@ -1976,5 +1976,5 @@ int Fl_Text_Display::handle(int event) {
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.26 2002/08/15 17:26:46 easysw Exp $".
|
||||
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.27 2002/08/20 17:12:19 easysw Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user