From e981106274582a5e470dfb63ce81c893f62d7267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Oct 2009 13:31:34 +0000 Subject: * MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs: Fixed 'Bug 544395 - Format document operation should be an atomic undo'. svn path=/trunk/monodevelop/; revision=143646 --- .../MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting') diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs index 8feb6be54e..a6c3855e1b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs @@ -60,8 +60,10 @@ namespace MonoDevelop.Ide.CodeFormatting IPrettyPrinter printer = TextFileService.GetPrettyPrinter (mt); if (printer == null) return; + doc.TextEditor.BeginAtomicUndo (); doc.TextEditor.Select (0, doc.TextEditor.TextLength); doc.TextEditor.SelectedText = printer.FormatText (doc.Project, mt, doc.TextEditor.Text); + doc.TextEditor.EndAtomicUndo (); } } } -- cgit v1.2.3