From: Martin Vermeer Date: Wed, 16 Nov 2005 13:12:15 +0000 (+0000) Subject: Fix bug 1966 X-Git-Tag: 1.6.10~13790 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=eff44c1347ab4e38da0b2cb6b58a8cbee6045e5f;p=features.git Fix bug 1966 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10606 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 32fb5ab833..6f2fb318aa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-11-07 Martin Vermeer + + * text.C (redoParagraph): Fix bug 1966: cursor doesn't go to next + line after typing ctrl-enter + 2005-11-10 Jürgen Spitzmüller * bufferview_funcs.C (coordOffset): fix the fix for bug 2094, as diff --git a/src/text.C b/src/text.C index b56b9f4a46..1233653ed6 100644 --- a/src/text.C +++ b/src/text.C @@ -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();