Fix bug #7316 (Crash editing commands in math mode)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37760 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-02-22 17:54:35 +00:00
parent c3a2a48074
commit 2c0cab1a5f
4 changed files with 6 additions and 4 deletions

View File

@ -2535,9 +2535,9 @@ DocIterator const & BufferView::inlineCompletionPos() const
}
bool BufferView::fixInlineCompletionPos()
void BufferView::resetInlineCompletionPos()
{
return d->inlineCompletionPos_.fixIfBroken();
d->inlineCompletionPos_ = DocIterator();
}

View File

@ -189,7 +189,7 @@ public:
/// return the position in the buffer of the inline completion postfix.
DocIterator const & inlineCompletionPos() const;
/// make sure inline completion position is OK
bool fixInlineCompletionPos();
void resetInlineCompletionPos();
/// set the inline completion postfix and its position in the buffer.
/// Updates the updateFlags in \c cur.
void setInlineCompletion(Cursor & cur, DocIterator const & pos,

View File

@ -1783,7 +1783,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
bool badcursor = notifyCursorLeaves(old, view()->cursor());
if (badcursor) {
view()->cursor().fixIfBroken();
view()->fixInlineCompletionPos();
view()->resetInlineCompletionPos();
}
}

View File

@ -61,6 +61,8 @@ What's new
* USER INTERFACE
- Fix crash when editing the name of an unknown math macro with an argument
which is immediately followed by another unknown math macro (bug 7316).