]> git.lyx.org Git - features.git/commitdiff
Fix bug #7316 (Crash editing commands in math mode)
authorEnrico Forestieri <forenr@lyx.org>
Mon, 21 Feb 2011 15:26:28 +0000 (15:26 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 21 Feb 2011 15:26:28 +0000 (15:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37750 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp
src/BufferView.h
src/Cursor.cpp

index fb82f10ce7e829fe965f198ac2218c20f8a423c9..8d0539428aa0a21b8243032e0d117b26b5476743 100644 (file)
@@ -2859,9 +2859,9 @@ DocIterator const & BufferView::inlineCompletionPos() const
 }
 
 
-bool BufferView::fixInlineCompletionPos()
+void BufferView::resetInlineCompletionPos()
 {
-       return d->inlineCompletionPos_.fixIfBroken();
+       d->inlineCompletionPos_ = DocIterator();
 }
 
 
index c2ae8811d9d902a02ed6e6131b4c5b64c525809c..f424d433db4d0823601bf48088e991d18e3bcb26 100644 (file)
@@ -191,7 +191,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,
index 64e2273d8fb1bc4f171246d6fb78ec1ba76d702b..266938a2d9b341fd86f552dab9b43d07a535a118 100644 (file)
@@ -402,7 +402,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
                bool badcursor = notifyCursorLeavesOrEnters(old, *this);
                if (badcursor) {
                        fixIfBroken();
-                       bv().fixInlineCompletionPos();
+                       bv().resetInlineCompletionPos();
                }
                old.endUndoGroup();
        }