On Sat, Feb 15, 2003 at 07:15:41PM +0200, Dekel Tsur wrote:

> Another strange behavior which may be the result of the same bug:
> Start a new document, type 'a' and then <space>: The 'a' appears on the
> screen, but the space doesn't.

Try this below.


Index: lyxrow.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxrow.C,v
retrieving revision 1.13
diff -u -r1.13 lyxrow.C
--- lyxrow.C    14 Feb 2003 00:41:38 -0000      1.13
+++ lyxrow.C    15 Feb 2003 17:41:28 -0000
@@ -147,12 +147,6 @@
 
 bool nextRowIsAllInset(Row const & row, pos_type last)
 {
-       if (!row.next())
-               return false;
-
-       if (row.par() != row.next()->par())
-               return false;
-
        if (!row.par()->isInset(last + 1))
                return false;
 
@@ -166,9 +160,14 @@
 pos_type Row::lastPrintablePos() const
 {
        pos_type const last = lastPos();
-       bool const ignore_space_at_last = !nextRowIsAllInset(*this, last);
 
-       if (ignore_space_at_last && par()->isSeparator(last))
+       // if this row is an end of par, just act like lastPos()
+       if (!next() || par() != next()->par())
+               return last;
+
+       bool const nextrownotinset = !nextRowIsAllInset(*this, last);
+
+       if (nextrownotinset && par()->isSeparator(last))
                return last - 1;
 
        return last;

Reply via email to