mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Fix bug #7068 (Crash when pressing down arrow in an equation when there is a suggestion)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36617 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0612d77267
commit
eb2600483a
@ -2859,6 +2859,12 @@ DocIterator const & BufferView::inlineCompletionPos() const
|
||||
}
|
||||
|
||||
|
||||
bool BufferView::fixInlineCompletionPos()
|
||||
{
|
||||
return d->inlineCompletionPos_.fixIfBroken();
|
||||
}
|
||||
|
||||
|
||||
bool samePar(DocIterator const & a, DocIterator const & b)
|
||||
{
|
||||
if (a.empty() && b.empty())
|
||||
|
@ -190,6 +190,8 @@ public:
|
||||
size_t const & inlineCompletionUniqueChars() const;
|
||||
/// return the position in the buffer of the inline completion postfix.
|
||||
DocIterator const & inlineCompletionPos() const;
|
||||
/// make sure inline completion position is OK
|
||||
bool fixInlineCompletionPos();
|
||||
/// set the inline completion postfix and its position in the buffer.
|
||||
/// Updates the updateFlags in \c cur.
|
||||
void setInlineCompletion(Cursor & cur, DocIterator const & pos,
|
||||
|
@ -1652,8 +1652,10 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
old.beginUndoGroup();
|
||||
old.fixIfBroken();
|
||||
bool badcursor = notifyCursorLeavesOrEnters(old, bv->cursor());
|
||||
if (badcursor)
|
||||
if (badcursor) {
|
||||
bv->cursor().fixIfBroken();
|
||||
bv->fixInlineCompletionPos();
|
||||
}
|
||||
old.endUndoGroup();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user