Author: AlbrechtS
Date: 2009-10-22 04:44:48 -0700 (Thu, 22 Oct 2009)
New Revision: 6921
Log:
Fix for TextEditor (STR #2276). To do: further fixes as described there.


Modified:
   trunk/CHANGES
   trunk/src/TextDisplay.cxx

Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES       2009-10-22 10:58:07 UTC (rev 6920)
+++ trunk/CHANGES       2009-10-22 11:44:48 UTC (rev 6921)
@@ -2586,3 +2586,11 @@
 
 fluid/Makefile didn't respect ${DESTDIR} for fltk2-config --post
 (STR #1701, 2065, 2254)
+
+////////////////////////////////////////////////////////////////
+
+Fix for word wrapping, equivalent to svn -r 5194 for FLTK 1.1.
+This fixes cursor positioning issues when wrap mode is on in
+TextEditor (FLTK 1.1 - STR #1227). This has also been discussed in
+fltk.bugs in Dec. 2008 (please refer to STR #2276), but not yet
+completely fixed.

Modified: trunk/src/TextDisplay.cxx
===================================================================
--- trunk/src/TextDisplay.cxx   2009-10-22 10:58:07 UTC (rev 6920)
+++ trunk/src/TextDisplay.cxx   2009-10-22 11:44:48 UTC (rev 6921)
@@ -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-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to