changeset 369:5facb856b388

- Added a workaround for missing lines with "View Source".
author jcid
date Tue, 30 Sep 2008 16:59:01 +0200
parents 2242da885677
children 7192a905f8b1
files src/dialog.cc
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialog.cc	Tue Sep 30 16:32:41 2008 +0200
+++ b/src/dialog.cc	Tue Sep 30 16:59:01 2008 +0200
@@ -133,8 +133,6 @@
  
     TextDisplay *td = new TextDisplay(0,0,ww, wh-bh);
     td->buffer()->text(txt);
-    /* enable wrapping lines; text uses entire width of window */
-    td->wrap_mode(true, 0);
 
     if (textfont)
        td->textfont(textfont);
@@ -148,6 +146,11 @@
     line_num_width = (int)(line_num_width * fltk::getwidth("0"));
     td->linenumber_width(line_num_width);
 
+    /* enable wrapping lines; text uses entire width of window */
+    td->wrap_mode(true, false);
+    /* WORKAROUND: FLTK may not display all the lines without this */
+    td->resize(ww+1,wh-bh);
+
     ReturnButton *b = new ReturnButton (0, wh-bh, ww, bh, "Close");
     b->callback(window_close_cb, window);