From 4f75130870e244022275e1913581b52ad9f40227 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 24 Oct 2002 17:26:03 +0000 Subject: Limit resizes to 1 line minimum. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2692 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Display.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index b030b3ba5..d238c304c 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Display.cxx,v 1.12.2.33 2002/10/23 13:21:14 easysw Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.34 2002/10/24 17:26:03 easysw Exp $" // // Copyright 2001-2002 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -377,6 +377,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { /* reallocate and update the line starts array, which may have changed size and / or contents. */ int nvlines = (text_area.h + mMaxsize - 1) / mMaxsize; + if (nvlines < 1) nvlines = 1; if (mNVisibleLines != nvlines) { mNVisibleLines = nvlines; if (mLineStarts) delete[] mLineStarts; @@ -3026,5 +3027,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.33 2002/10/23 13:21:14 easysw Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.34 2002/10/24 17:26:03 easysw Exp $". // -- cgit v1.2.3