mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Two small fixes with right cursor settings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4116 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8d4e2f31c4
commit
025a1ad106
@ -1,5 +1,10 @@
|
||||
2002-05-02 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* text2.C (fixCursorAfterDelete): check to make sure we don't request
|
||||
to set the cursor behind the pargraph with > size().
|
||||
(setCursor): check also for the same paragraph when checking where
|
||||
to put the cursor if we have a NFR inset.
|
||||
|
||||
* buffer.C (parseSingleLyXformat2Token): move the compatibility
|
||||
parts of layout read further up as it still was in the wrong
|
||||
position.
|
||||
|
@ -2072,6 +2072,7 @@ void LyXText::setCursor(BufferView * bview, LyXCursor & cur, Paragraph * par,
|
||||
cur.iy(y + row->baseline());
|
||||
Inset * ins;
|
||||
if (row->previous() && pos &&
|
||||
row->previous()->par() == row->par() &&
|
||||
par->getChar(pos) == Paragraph::META_INSET &&
|
||||
(ins=par->getInset(pos)) && (ins->needFullRow() || ins->display()))
|
||||
{
|
||||
@ -2404,6 +2405,11 @@ void LyXText::fixCursorAfterDelete(BufferView * bview,
|
||||
if (cur.pos() > where.pos())
|
||||
cur.pos(cur.pos()-1);
|
||||
|
||||
// check also if we don't want to set the cursor on a spot behind the
|
||||
// pagragraph because we erased the last character.
|
||||
if (cur.pos() > cur.par()->size())
|
||||
cur.pos(cur.par()->size());
|
||||
|
||||
// recompute row et al. for this cursor
|
||||
setCursor(bview, cur, cur.par(), cur.pos(), cur.boundary());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user