Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@novell.com>2009-10-07 17:31:34 +0400
committerMike Krüger <mkrueger@novell.com>2009-10-07 17:31:34 +0400
commite981106274582a5e470dfb63ce81c893f62d7267 (patch)
tree7851976d287276e9b9c8291f0ac6148059d6749f /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting
parent0dd10bc48a7ff7e4981036e5f11920183b38b53e (diff)
* MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs: Fixed
'Bug 544395 - Format document operation should be an atomic undo'. svn path=/trunk/monodevelop/; revision=143646
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs2
1 files changed, 2 insertions, 0 deletions
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 ();
}
}
}