Fix merge of paragraphs at the start of a document

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6183 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-02-17 01:54:32 +00:00
parent e3833fbf0a
commit 6a5681cf9d
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2003-02-17 John Levon <levon@movementarian.org>
* text.C (Delete): fix case where delete at the end of
the very first paragraph would not merge the pars
2003-02-17 John Levon <levon@movementarian.org> 2003-02-17 John Levon <levon@movementarian.org>
* lyxrow.C: fix lastPrintablePos() * lyxrow.C: fix lastPrintablePos()

View File

@ -2612,7 +2612,7 @@ void LyXText::Delete(BufferView * bview)
LyXCursor old_cursor = cursor; LyXCursor old_cursor = cursor;
int const old_cur_par_id = old_cursor.par()->id(); int const old_cur_par_id = old_cursor.par()->id();
int const old_cur_par_prev_id = old_cursor.par()->previous() ? int const old_cur_par_prev_id = old_cursor.par()->previous() ?
old_cursor.par()->previous()->id() : 0; old_cursor.par()->previous()->id() : -1;
// just move to the right // just move to the right
cursorRight(bview); cursorRight(bview);
@ -2623,7 +2623,7 @@ void LyXText::Delete(BufferView * bview)
// and that can very well delete the par or par->previous in // and that can very well delete the par or par->previous in
// old_cursor. Will a solution where we compare paragraph id's // old_cursor. Will a solution where we compare paragraph id's
//work better? //work better?
if ((cursor.par()->previous() ? cursor.par()->previous()->id() : 0) if ((cursor.par()->previous() ? cursor.par()->previous()->id() : -1)
== old_cur_par_prev_id == old_cur_par_prev_id
&& cursor.par()->id() != old_cur_par_id) { && cursor.par()->id() != old_cur_par_id) {
// delete-empty-paragraph-mechanism has done it // delete-empty-paragraph-mechanism has done it