From a895406082409f9713534d9dd0640ee48683d221 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Fri, 24 Nov 2006 22:12:04 +0000 Subject: [PATCH] * src/text.C: fix end-of-par handling (change tracking); remove blank lines; add {} around else branch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16031 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/text.C | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/text.C b/src/text.C index 11b6830627..f118faad8f 100644 --- a/src/text.C +++ b/src/text.C @@ -1659,22 +1659,17 @@ bool LyXText::erase(LCursor & cur) cur.forwardPosNoDescend(); needsUpdate = true; } else if (cur.pit() != cur.lastpit()) { - if (cur.buffer().params().trackChanges - && par.isInserted(cur.pos())) { - // mark "carriage return" as deleted: - // FIXME: Change tracking (MG) + if (!par.isMergedOnEndOfParDeletion(cur.buffer().params().trackChanges)) { par.setChange(cur.pos(), Change(Change::DELETED)); cur.forwardPos(); needsUpdate = true; } else { setCursorIntern(cur, cur.pit() + 1, 0); needsUpdate = backspacePos0(cur); - // FIXME: Change tracking (MG) - if (cur.paragraph().isDeleted(cur.pos())) - cur.forwardPos(); } - } else + } else { needsUpdate = dissolveInset(cur); + } // FIXME: Inserting characters has nothing to do with setting a cursor. // Because of the mix between the model (the paragraph contents) @@ -1725,7 +1720,7 @@ bool LyXText::backspacePos0(LCursor & cur) needsUpdate = true; } // Pasting is not allowed, if the paragraphs have different - // layout. I think it is a real bug of all other + // layouts. I think it is a real bug of all other // word processors to allow it. It confuses the user. // Correction: Pasting is always allowed with standard-layout else if (par.layout() == prevpar.layout() @@ -1744,8 +1739,6 @@ bool LyXText::backspacePos0(LCursor & cur) } - - bool LyXText::backspace(LCursor & cur) { BOOST_ASSERT(this == cur.text()); -- 2.39.2