mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
fix old off-by-one bug resulting in a coordcache assert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10256 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
73024d44b0
commit
6d8ce8c308
@ -776,11 +776,11 @@ int MathGridInset::cellYOffset(idx_type idx) const
|
||||
bool MathGridInset::idxUpDown(LCursor & cur, bool up) const
|
||||
{
|
||||
if (up) {
|
||||
if (cur.idx() < ncols())
|
||||
if (cur.row() == 0)
|
||||
return false;
|
||||
cur.idx() -= ncols();
|
||||
} else {
|
||||
if (cur.row() >= nrows())
|
||||
if (cur.row() + 1 >= nrows())
|
||||
return false;
|
||||
cur.idx() += ncols();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user