[EMAIL PROTECTED] schrieb:
Author: sts
Date: Tue May 29 22:53:32 2007
New Revision: 18569

Modified: lyx-devel/trunk/src/Text2.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Text2.cpp?rev=18569
==============================================================================
--- lyx-devel/trunk/src/Text2.cpp (original)
+++ lyx-devel/trunk/src/Text2.cpp Tue May 29 22:53:32 2007
@@ -975,206 +986,88 @@
        // Tell BufferView to test for FitCursor in any case!
        cur.updateFlags(Update::FitCursor);
+ // not at paragraph start?
        if (cur.pos() > 0) {
+               // if on right side of boundary (i.e. not at paragraph end, but 
line end)
+               // -> skip it, i.e. set boundary to true, i.e. go only 
logically left
+               // there are some exceptions to ignore this: lineseps, 
newlines, spaces
+#ifdef DEBUG
+               bool bound = cur.boundary();
+               int rowpos = cur.textRow().pos();
+               int pos = cur.pos();
+               bool sep = cur.paragraph().isSeparator(cur.pos() - 1);
+               bool newline = cur.paragraph().isNewline(cur.pos() - 1);
+               bool linesep = cur.paragraph().isLineSeparator(cur.pos() - 1);
+#endif

This debug code produces no output. What is it good for?

+#ifdef DEBUG
+               int endpos = cur.textRow().endpos();
+               int lastpos = cur.lastpos();
+               int pos = cur.pos();
+               bool linesep = cur.paragraph().isLineSeparator(cur.pos());
+               bool newline = cur.paragraph().isNewline(cur.pos());
+               bool sep = cur.paragraph().isSeparator(cur.pos());
+               if (cur.pos() != cur.lastpos()) {
+                       bool linesep2 = 
cur.paragraph().isLineSeparator(cur.pos()+1);
+                       bool newline2 = cur.paragraph().isNewline(cur.pos()+1);
+                       bool sep2 = cur.paragraph().isSeparator(cur.pos()+1);
+               }
+#endif

Dito.

Michael

Reply via email to