From dde4dbd61f5b8efd2ac5a995e896a4ed8a58140d Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 1 Oct 2011 06:48:50 +0000 Subject: 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 --- src/Fl_Text_Display.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_Text_Display.cxx') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index fb02fab70..3955f196b 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -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 lines in the buffer, and can leave the top line number incorrect, and 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; mNBufferLines = count_lines(0, buffer()->length(), true); mFirstChar = line_start(mFirstChar); -- cgit v1.2.3