* 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());
setCursorIntern(cur, cur.pit(), cur.pos() + 1, false, cur.boundary());
needsUpdate = backspace(cur);
Paragraph & par = cur.paragraph();
if (cur.pos() < par.size()
&& par.lookupChange(cur.pos()) == Change::DELETED)
if (cur.paragraph().lookupChange(cur.pos()) == Change::DELETED)
cur.posRight();
} else if (cur.pit() != cur.lastpit()) {
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()) {
recordUndo(scur, Undo::DELETE, scur.pit());
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 {
setCursorIntern(scur, scur.pit(), scur.pos(), false, scur.boundary());
}