implement undo grouping for command sequences

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27605 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-11-17 12:26:19 +00:00
parent 4c1c676e35
commit 7d561f91a6

View File

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