From: Jean-Marc Lasgouttes Date: Mon, 17 Nov 2008 12:26:19 +0000 (+0000) Subject: implement undo grouping for command sequences X-Git-Tag: 2.0.0~7676 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7d561f91a6edbf9186ba8d32b92ddd00b44687f1;p=features.git implement undo grouping for command sequences git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27605 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index b577b65a76..6b3a93f308 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -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; }