mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
fix crash on 'page up' near the top of the UserGuide
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7972 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
970e98f279
commit
3b4253cf80
25
src/text3.C
25
src/text3.C
@ -269,24 +269,27 @@ void LyXText::cursorPrevious()
|
|||||||
return;
|
return;
|
||||||
// This is what we used to do, so we wouldn't skip right past
|
// This is what we used to do, so we wouldn't skip right past
|
||||||
// tall rows, but it's not working right now.
|
// tall rows, but it's not working right now.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inset_owner) {
|
||||||
|
new_y = bv()->text->cursor.y()
|
||||||
|
+ bv()->theLockingInset()->insetInInsetY() + y
|
||||||
|
+ rit->height()
|
||||||
|
- bv()->workHeight() + 1;
|
||||||
} else {
|
} else {
|
||||||
if (inset_owner) {
|
new_y = cursor.y()
|
||||||
new_y = bv()->text->cursor.y()
|
- rit->baseline()
|
||||||
+ bv()->theLockingInset()->insetInInsetY() + y
|
+ rit->height()
|
||||||
+ rit->height()
|
- bv()->workHeight() + 1;
|
||||||
- bv()->workHeight() + 1;
|
|
||||||
} else {
|
|
||||||
new_y = cursor.y()
|
|
||||||
- rit->baseline()
|
|
||||||
+ rit->height()
|
|
||||||
- bv()->workHeight() + 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LyXCursor cur;
|
LyXCursor cur;
|
||||||
rit = cursorRow();
|
rit = cursorRow();
|
||||||
ParagraphList::iterator pit = cursorPar();
|
ParagraphList::iterator pit = cursorPar();
|
||||||
rit = cursorRow();
|
rit = cursorRow();
|
||||||
|
if (isFirstRow(pit, *rit))
|
||||||
|
return;
|
||||||
|
|
||||||
previousRow(pit, rit);
|
previousRow(pit, rit);
|
||||||
setCursor(cur, parOffset(pit), rit->pos(), false);
|
setCursor(cur, parOffset(pit), rit->pos(), false);
|
||||||
if (cur.y() > bv_owner->top_y())
|
if (cur.y() > bv_owner->top_y())
|
||||||
|
Loading…
Reference in New Issue
Block a user