]> git.lyx.org Git - features.git/commitdiff
fix a few 'OUT OF SYNC'
authorAndré Pönitz <poenitz@gmx.net>
Thu, 6 Nov 2003 11:56:10 +0000 (11:56 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 6 Nov 2003 11:56:10 +0000 (11:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8055 a592a061-630c-0410-9148-cb99ea01b6c8

src/cursor.C
src/insets/insettext.C

index 3c472d3a06e2f197c581c851ce414772859668e0..e6c897300839534fa34f3d8348cffa656766489f 100644 (file)
@@ -120,8 +120,11 @@ void LCursor::push(InsetOld * inset, LyXText * text)
 
 void LCursor::pop()
 {
-       BOOST_ASSERT(!data_.empty());
-       data_.pop_back();
+       //BOOST_ASSERT(!data_.empty());
+       if (data_.empty())
+               lyxerr << "### TRYING TO POP FROM EMPTY CURSOR" << endl;
+       else
+               data_.pop_back();
 }
 
 
index 4963779a62f4b9b9e28804f2ed983aee9def4dc1..e90fcb85aed399850039e7857a0a571625e0a6b0 100644 (file)
@@ -17,6 +17,7 @@
 #include "bufferparams.h"
 #include "BufferView.h"
 #include "CutAndPaste.h"
+#include "cursor.h"
 #include "debug.h"
 #include "dispatchresult.h"
 #include "errorlist.h"
@@ -719,6 +720,7 @@ InsetText::priv_dispatch(FuncRequest const & cmd,
                        if (result.val() >= FINISHED) {
                                updateLocal(bv, false);
                                bv->unlockInset(this);
+                               bv->cursor().pop();
                        }
                        break;
                case FINISHED_DOWN:
@@ -726,6 +728,7 @@ InsetText::priv_dispatch(FuncRequest const & cmd,
                        if (result.val() >= FINISHED) {
                                updateLocal(bv, false);
                                bv->unlockInset(this);
+                               bv->cursor().pop();
                        }
                        break;
                default:
@@ -951,6 +954,7 @@ InsetText::priv_dispatch(FuncRequest const & cmd,
        if (result.val() >= FINISHED) {
                result.val(NONE);
                bv->unlockInset(this);
+               bv->cursor().pop();
        }
 
        return result;