mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
get rid of a crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9702 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
847afab142
commit
aaca522459
@ -1,3 +1,9 @@
|
||||
|
||||
2005-03-07 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
* text2.C (cursorUp): get rid of a crash
|
||||
* text.C (x2pos): add an assert
|
||||
|
||||
2005-03-07 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* lyxfunc.C (getStatus): fix warning when assertions are disabled
|
||||
|
@ -2215,6 +2215,7 @@ string LyXText::getPossibleLabel(LCursor & cur) const
|
||||
|
||||
pos_type LyXText::x2pos(pit_type pit, int row, int x) const
|
||||
{
|
||||
BOOST_ASSERT(row < pars_[pit].rows().size());
|
||||
bool bound = false;
|
||||
Row const & r = pars_[pit].rows()[row];
|
||||
return r.pos() + getColumnNearX(pit, r, x, bound);
|
||||
|
@ -987,8 +987,8 @@ bool LyXText::cursorUp(LCursor & cur)
|
||||
x2pos(cur.pit(), row - 1, x));
|
||||
} else if (cur.pit() > 0) {
|
||||
--cur.pit();
|
||||
updateNeeded |= setCursor(cur, cur.pit(),
|
||||
x2pos(cur.pit(), par.rows().size() - 1, x));
|
||||
//cannot use 'par' now
|
||||
updateNeeded |= setCursor(cur, cur.pit(), x2pos(cur.pit(), cur.paragraph().rows().size() - 1, x));
|
||||
}
|
||||
|
||||
cur.x_target() = x;
|
||||
|
Loading…
Reference in New Issue
Block a user