If a vertical scrollbar is added, wrapped lines must be recalculated.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9107 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2011-10-01 06:48:50 +00:00
parent 9bdc310346
commit dde4dbd61f
+1 -1
View File
@@ -315,7 +315,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) {
/* In continuous wrap mode, a change in width affects the total number of /* In continuous wrap mode, a change in width affects the total number of
lines in the buffer, and can leave the top line number incorrect, and lines in the buffer, and can leave the top line number incorrect, and
the top character no longer pointing at a valid line start */ the top character no longer pointing at a valid line start */
if (mContinuousWrap && !mWrapMarginPix && W!=oldWidth) { if (mContinuousWrap && !mWrapMarginPix && (W!=oldWidth || text_area.w!=oldTAWidth)) {
int oldFirstChar = mFirstChar; int oldFirstChar = mFirstChar;
mNBufferLines = count_lines(0, buffer()->length(), true); mNBufferLines = count_lines(0, buffer()->length(), true);
mFirstChar = line_start(mFirstChar); mFirstChar = line_start(mFirstChar);