+
+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
2005-03-07 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* lyxfunc.C (getStatus): fix warning when assertions are disabled
pos_type LyXText::x2pos(pit_type pit, int row, int x) 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);
bool bound = false;
Row const & r = pars_[pit].rows()[row];
return r.pos() + getColumnNearX(pit, r, x, bound);
x2pos(cur.pit(), row - 1, x));
} else if (cur.pit() > 0) {
--cur.pit();
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));