* src/text.C

(bool LyXText::Delete):
	move cursor to next par after deleting a paragraph break
	in change tracking mode. 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13495 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2006-03-25 16:38:28 +00:00
parent 23b74fa112
commit 64aab4aa75

View File

@ -1579,17 +1579,21 @@ bool LyXText::Delete(LCursor & cur)
recordUndo(cur, Undo::DELETE, cur.pit()); recordUndo(cur, Undo::DELETE, cur.pit());
setCursorIntern(cur, cur.pit(), cur.pos() + 1, false, cur.boundary()); setCursorIntern(cur, cur.pit(), cur.pos() + 1, false, cur.boundary());
needsUpdate = backspace(cur); needsUpdate = backspace(cur);
Paragraph & par = cur.paragraph(); if (cur.paragraph().lookupChange(cur.pos()) == Change::DELETED)
if (cur.pos() < par.size()
&& par.lookupChange(cur.pos()) == Change::DELETED)
cur.posRight(); cur.posRight();
} else if (cur.pit() != cur.lastpit()) { } else if (cur.pit() != cur.lastpit()) {
LCursor scur = cur; LCursor scur = cur;
setCursorIntern(cur, cur.pit()+1, 0, false, false); setCursorIntern(cur, cur.pit() + 1, 0, false, false);
if (pars_[cur.pit()].layout() == pars_[scur.pit()].layout()) { if (pars_[cur.pit()].layout() == pars_[scur.pit()].layout()) {
recordUndo(scur, Undo::DELETE, scur.pit()); recordUndo(scur, Undo::DELETE, scur.pit());
needsUpdate = backspace(cur); needsUpdate = backspace(cur);
if (cur.buffer().params().tracking_changes) {
// move forward after the paragraph break is DELETED
Paragraph & par = cur.paragraph();
if (par.lookupChange(par.size()) == Change::DELETED)
setCursorIntern(cur, cur.pit() + 1, 0);
}
} else { } else {
setCursorIntern(scur, scur.pit(), scur.pos(), false, scur.boundary()); setCursorIntern(scur, scur.pit(), scur.pos(), false, scur.boundary());
} }