mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 01:08:45 +00:00
Fix crash when using down cursor in an empty math subscript (Bug 4117).
http://bugzilla.lyx.org/show_bug.cgi?id=4117 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19689 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
920be91bec
commit
75e3b6a419
@ -1482,12 +1482,14 @@ Font Cursor::getFont() const
|
||||
}
|
||||
|
||||
|
||||
void Cursor::fixIfBroken()
|
||||
bool Cursor::fixIfBroken()
|
||||
{
|
||||
if (DocIterator::fixIfBroken()) {
|
||||
clearSelection();
|
||||
resetAnchor();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -179,8 +179,9 @@ public:
|
||||
* Not using noUpdate() should never be wrong.
|
||||
*/
|
||||
void noUpdate();
|
||||
/// fix cursor in circumstances that should never happen
|
||||
void fixIfBroken();
|
||||
/// fix cursor in circumstances that should never happen.
|
||||
/// \retval true if a fix occured.
|
||||
bool fixIfBroken();
|
||||
|
||||
/// output
|
||||
friend std::ostream & operator<<(std::ostream & os, Cursor const & cur);
|
||||
|
@ -568,8 +568,16 @@ goto_char_backwards:
|
||||
// notify left insets and give them chance to set update flags
|
||||
lyx::notifyCursorLeaves(cur.beforeDispatchCursor(), cur);
|
||||
cur.fixIfBroken();
|
||||
} else
|
||||
cur.undispatched();
|
||||
break;
|
||||
}
|
||||
|
||||
if (cur.fixIfBroken())
|
||||
// FIXME: Something bad happened. We pass the corrected Cursor
|
||||
// instead of letting things go worse.
|
||||
break;
|
||||
|
||||
// We did not manage to move the cursor.
|
||||
cur.undispatched();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,8 @@ What's new
|
||||
- Fix crash when a user removes a formula when its preview is being generated.
|
||||
(gcc 3 only).
|
||||
|
||||
- Fix crash when using down cursor in an empty math subscript (Bug 4117).
|
||||
|
||||
* DOCUMENTATION
|
||||
|
||||
- Embedded Objects manual: section about longtable alignment added
|
||||
|
Loading…
Reference in New Issue
Block a user