Author: matt
Date: 2010-04-30 13:36:31 -0700 (Fri, 30 Apr 2010)
New Revision: 7570
Log:
OK, the editor is now quite fast. It seems that measuring the maximum line
length has really wasted tons of time. Let's fix that.
Modified:
branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx
branches/branch-1.3-STR2158-matt/test/editor.cxx
Modified: branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx 2010-04-30
20:26:07 UTC (rev 7569)
+++ branches/branch-1.3-STR2158-matt/src/Fl_Text_Display.cxx 2010-04-30
20:36:31 UTC (rev 7570)
@@ -2320,6 +2320,9 @@
Return the width in pixels of the displayed line pointed to by "visLineNum"
*/
int Fl_Text_Display::measure_vline( int visLineNum ) const {
+
+ return 1024; // FIXME: time waster?
+
int i, width = 0, len, style, lineLen = vline_length( visLineNum );
int charCount = 0, lineStartPos = mLineStarts[ visLineNum ];
char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ];
Modified: branches/branch-1.3-STR2158-matt/test/editor.cxx
===================================================================
--- branches/branch-1.3-STR2158-matt/test/editor.cxx 2010-04-30 20:26:07 UTC
(rev 7569)
+++ branches/branch-1.3-STR2158-matt/test/editor.cxx 2010-04-30 20:36:31 UTC
(rev 7570)
@@ -792,7 +792,7 @@
int main(int argc, char **argv) {
textbuf = new Fl_Text_Buffer;
textbuf->text(
-#if 1
+#if 0
"void saveas_cb() {\n"
" Fl_Native_File_Chooser fnfc;\n"
" fnfc.title(\"Save File As?\");\n"
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit