Author: matt
Date: 2010-05-09 14:07:27 -0700 (Sun, 09 May 2010)
New Revision: 7598
Log:
Removed Fl_Text_Display::mFixedFontWidth because it would always be -1 anyways.

Modified:
   branches/branch-1.3-STR2158-matt/FL/Fl_Text_Display.H
   branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx

Modified: branches/branch-1.3-STR2158-matt/FL/Fl_Text_Display.H
===================================================================
--- branches/branch-1.3-STR2158-matt/FL/Fl_Text_Display.H       2010-05-09 
20:58:46 UTC (rev 7597)
+++ branches/branch-1.3-STR2158-matt/FL/Fl_Text_Display.H       2010-05-09 
21:07:27 UTC (rev 7598)
@@ -376,8 +376,6 @@
   
   int mMaxsize;
   
-  int mFixedFontWidth;        /* Font width if all current fonts are
-                               fixed and match in width, else -1 */
   int mSuppressResync;         /* Suppress resynchronization of line
                                  starts during buffer updates */
   int mNLinesDeleted;                  /* Number of lines deleted during

Modified: branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx    2010-05-09 
20:58:46 UTC (rev 7597)
+++ branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx    2010-05-09 
21:07:27 UTC (rev 7598)
@@ -129,7 +129,6 @@
   
   mCursor_color = FL_FOREGROUND_COLOR;
   
-  mFixedFontWidth = -1;
   mStyleBuffer = 0;
   mStyleTable = 0;
   mNStyles = 0;
@@ -1130,8 +1129,7 @@
  */
 void Fl_Text_Display::buffer_predelete_cb(int pos, int nDeleted, void *cbArg) {
   Fl_Text_Display *textD = (Fl_Text_Display *)cbArg;
-  if (textD->mContinuousWrap &&
-      (textD->mFixedFontWidth == -1 || textD->mModifyingTabDistance))
+  if (textD->mContinuousWrap)
   /* Note: we must perform this measurement, even if there is not a
    single character deleted; the number of "deleted" lines is the
    number of visual lines spanned by the real line in which the 
@@ -2526,9 +2524,10 @@
    to measure in columns, than to count pixels.  Determine if we can count
    in columns (countPixels == False) or must count pixels (countPixels ==
    True), and set the wrap target for either pixels or columns */
-  if (mFixedFontWidth != -1 || mWrapMargin != 0) {
+  if (mWrapMargin != 0) {
+    // FIXME: the warp margin is actually a pixel boundary, so we have to 
measure nevertheless!
     countPixels = false;
-    wrapMargin = mWrapMargin ? mWrapMargin : text_area.w / (mFixedFontWidth + 
1);
+    wrapMargin = mWrapMargin;
     maxWidth = INT_MAX;
   } else {
     countPixels = true;
@@ -2755,7 +2754,7 @@
   /* If the Fl_Text_Selection was extended due to a style change, and some of 
the
    fonts don't match in spacing, extend redraw area to end of line to
    redraw characters exposed by possible font size changes */
-  if ( mFixedFontWidth == -1 && extended )
+  if ( extended )
     *endpos = mBuffer->line_end( *endpos ) + 1;
 }
 

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to