Author: switt
Date: Mon Jan 10 11:31:20 2011
New Revision: 37163
URL: http://www.lyx.org/trac/changeset/37163
Log:
#7209 avoid a crash in inMacroMode(): one cannot get the previous atom of an
empty math cell
Modified:
lyx-devel/branches/BRANCH_1_6_X/src/Cursor.cpp
lyx-devel/branches/BRANCH_1_6_X/status.16x
Modified: lyx-devel/branches/BRANCH_1_6_X/src/Cursor.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_1_6_X/src/Cursor.cpp Mon Jan 10 11:23:10
2011 (r37162)
+++ lyx-devel/branches/BRANCH_1_6_X/src/Cursor.cpp Mon Jan 10 11:31:20
2011 (r37163)
@@ -1559,7 +1559,7 @@
{
if (!inMathed())
return false;
- if (pos() == 0)
+ if (pos() == 0 || cell().empty())
return false;
InsetMathUnknown const * p = prevAtom()->asUnknownInset();
return p && !p->final();
Modified: lyx-devel/branches/BRANCH_1_6_X/status.16x
==============================================================================
--- lyx-devel/branches/BRANCH_1_6_X/status.16x Mon Jan 10 11:23:10 2011
(r37162)
+++ lyx-devel/branches/BRANCH_1_6_X/status.16x Mon Jan 10 11:31:20 2011
(r37163)
@@ -178,6 +178,9 @@
- Don't allow to set an alignment for rows in math substack environments
(bug 2498).
+- Fix crash when clicking on begin of unfinished command in math
+ when autocomplete is active (bug 7209).
+
* DOCUMENTATION AND LOCALIZATION