]> git.lyx.org Git - features.git/commitdiff
Fix bug 1966
authorMartin Vermeer <martin.vermeer@hut.fi>
Wed, 16 Nov 2005 13:12:15 +0000 (13:12 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Wed, 16 Nov 2005 13:12:15 +0000 (13:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10606 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text.C

index 32fb5ab833dcfd5e48b6ace2640f6d531d08760e..6f2fb318aa1749a3209acbba38ff9dd617a81ac2 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-07  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * text.C (redoParagraph): Fix bug 1966: cursor doesn't go to next
+       line after typing ctrl-enter
+
 2005-11-10  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * bufferview_funcs.C (coordOffset): fix the fix for bug 2094, as
index b56b9f4a467c9f7c27199c7ef0ed673c0e7ac933..1233653ed6e55ee71cbe487a0489d65a74c1135d 100644 (file)
@@ -1716,6 +1716,20 @@ bool LyXText::redoParagraph(pit_type const pit)
                z = row.endpos();
        } while (z < par.size());
 
+       // Make sure that if a par ends in newline, there is one more row
+       // under it
+       // FIXME this is a dirty trick. Now the _same_ position in the
+       // paragraph occurs in _two_ different rows, and has two different
+       // display positions, leading to weird behaviour when moving up/down.
+       if (z > 0 && par.isNewline(z - 1)) {
+               Row row(z - 1);
+               row.endpos(z - 1);
+               setRowWidth(pit, row);
+               setHeightOfRow(pit, row);
+               par.rows().push_back(row);
+               dim.des += row.height();
+       }
+           
        dim.asc += par.rows()[0].ascent();
        dim.des -= par.rows()[0].ascent();