]> git.lyx.org Git - features.git/commitdiff
implement undo grouping for command sequences
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 17 Nov 2008 12:26:19 +0000 (12:26 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 17 Nov 2008 12:26:19 +0000 (12:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27605 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp

index b577b65a7624757ca1b479e2f7b5f70fcb036519..6b3a93f3082a884a7965f874263322e9cf83ffd4 100644 (file)
@@ -1349,6 +1349,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                case LFUN_COMMAND_SEQUENCE: {
                        // argument contains ';'-terminated commands
                        string arg = argument;
+                       if (theBufferList().isLoaded(buffer))
+                               buffer->undo().beginUndoGroup();
                        while (!arg.empty()) {
                                string first;
                                arg = split(arg, first, ';');
@@ -1356,6 +1358,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                func.origin = cmd.origin;
                                dispatch(func);
                        }
+                       if (theBufferList().isLoaded(buffer))
+                               buffer->undo().endUndoGroup();
                        break;
                }