w. szukalski wrote:
Version: fltk-2.0.x-r6525
I can only report, not fix, this.
I load a file with overlong lines into the editor.
The cursor is to the left of the first character.
When I now scroll down, scrolling stops when the
bottom line is overlong.
When I move the cursor right one position, scrolling
down is possible again.
When I move the cursor again to the left of the first
character and scroll up, scrolling does not stop.
This seems to be a scroll-down bug only.
The editor of FLTK-1.3 does not have this drawback.
The following line:
To subscribe, send mail to <a
href="mailto:[email protected]?body=subscribe"><code>[email protected]</code></a>
is wrapped by the editor after the '<a'. But the rest of the line,
101 characters, is overlong and not wrapped.
winfried
Please try the appended patch. This is something I found for FLTK 1 some time
ago. The complete FLTK 1 patch has been committed in svn -r 5194, but this one is
much shorter, because some of the changes have already been there in FLTK 2.
I tested this patch for FLTK 2 with your long line, and it worked for me.
Please report back, if it fixes your problem.
-----
P.S.: FLTK 2 team, please test this patch. Since I don't work on FLTK 2, I don't
intend to check this in ...
P.P.S: I found another bug that is _not_ fixed with this patch: If you insert
(paste) a long text into an empty text editor buffer, and this long text contains
wrapped lines, and if the last line is _not_ terminated by a LF, then the
scrollbar shows a small gap at the lower margin. If you move the cursor back to
the beginning of the text buffer, it stops at line 2 (not 1), and on the text
console window you see:
TextDisplay::display_insert(): internal consistency check tl1 failed
Albrecht
Index: src/TextDisplay.cxx
===================================================================
--- src/TextDisplay.cxx (revision 6583)
+++ src/TextDisplay.cxx (working copy)
@@ -861,7 +861,7 @@
/* FLTK widget shows one line too much (clipped at the bottom), so get last
char from line before that */
if (visiblelines_cnt_ > 1 && linestarts_[visiblelines_cnt_-2] != -1) {
- lastChar = buffer()->line_end(linestarts_[visiblelines_cnt_-2]);
+ lastChar = line_end(linestarts_[visiblelines_cnt_-2]);
}
hOffset = horiz_offset_;
@@ -959,7 +959,7 @@
if (position_to_line(cursor_pos_, &visLineNum))
lineStartPos = linestarts_[visLineNum];
else {
- lineStartPos = buffer()->line_start(cursor_pos_);
+ lineStartPos = line_start(cursor_pos_);
visLineNum = -1;
}
if (lineStartPos == 0)
@@ -973,7 +973,7 @@
if (visLineNum != -1 && visLineNum != 0)
prevLineStartPos = linestarts_[visLineNum - 1];
else
- prevLineStartPos = buffer()->rewind_lines(lineStartPos, 1);
+ prevLineStartPos = rewind_lines(lineStartPos, 1);
newPos = buffer_->skip_displayed_characters_utf(prevLineStartPos, column);
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs