]> git.lyx.org Git - features.git/commitdiff
always close properly undo groups
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 21 Jan 2010 16:59:39 +0000 (16:59 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 21 Jan 2010 16:59:39 +0000 (16:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33129 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp

index 542d1016b9295c3dafd28dd9d1ba9b8ee108fffa..100855e92f1349fe334cd7a49e0cfbd41bf83bce 100644 (file)
@@ -336,8 +336,10 @@ void Cursor::dispatch(FuncRequest const & cmd0)
                LYXERR(Debug::DEBUG, "Cursor::dispatch: (AtPoint) cmd: "
                        << cmd0 << endl << *this);
                nextInset()->dispatch(*this, tmpcmd);
-               if (result().dispatched())
+               if (result().dispatched()) {
+                       buffer()->undo().endUndoGroup();
                        return;
+               }
        }
 
        // store some values to be used inside of the handlers