Browse Source

add missing UndoGroups for CommentRegion and IndentSelection commands

pull/18/head
Siegfried Pammer 14 years ago
parent
commit
df86650d68
  1. 3
      src/Main/Base/Project/Src/Editor/Commands/CommentRegion.cs
  2. 3
      src/Main/Base/Project/Src/Editor/Commands/IndentSelection.cs

3
src/Main/Base/Project/Src/Editor/Commands/CommentRegion.cs

@ -23,7 +23,8 @@ namespace ICSharpCode.SharpDevelop.Editor.Commands @@ -23,7 +23,8 @@ namespace ICSharpCode.SharpDevelop.Editor.Commands
if (provider == null)
return;
provider.TextEditor.Language.FormattingStrategy.SurroundSelectionWithComment(provider.TextEditor);
using (provider.TextEditor.Document.OpenUndoGroup())
provider.TextEditor.Language.FormattingStrategy.SurroundSelectionWithComment(provider.TextEditor);
}
}
}

3
src/Main/Base/Project/Src/Editor/Commands/IndentSelection.cs

@ -33,7 +33,8 @@ namespace ICSharpCode.SharpDevelop.Editor.Commands @@ -33,7 +33,8 @@ namespace ICSharpCode.SharpDevelop.Editor.Commands
endLine = provider.TextEditor.Document.GetLineForOffset(provider.TextEditor.SelectionStart + provider.TextEditor.SelectionLength).LineNumber;
}
provider.TextEditor.Language.FormattingStrategy.IndentLines(provider.TextEditor, beginLine, endLine);
using (provider.TextEditor.Document.OpenUndoGroup())
provider.TextEditor.Language.FormattingStrategy.IndentLines(provider.TextEditor, beginLine, endLine);
}
}
}

Loading…
Cancel
Save