* 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/branches/BRANCH_1_4_X@13509 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2006-03-28 10:07:05 +00:00
parent ff4191df6d
commit 8b38f6f875
2 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-03-25 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* text.C (Delete): move cursor to next par after deleting
a paragraph break in change tracking mode.
2006-03-28 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* Makefile.am (lyx_SOURCES): add ParagraphList.h.

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());
}