aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/ScintillaCocoa.mm11
1 files changed, 6 insertions, 5 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index be71de367..8419a4157 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1102,11 +1102,12 @@ void ScintillaCocoa::Paste(bool forceRectangular) {
// No data or no flavor we support.
return;
- pdoc->BeginUndoAction();
- ClearSelection(false);
- InsertPasteShape(selectedText.Data(), selectedText.Length(),
- selectedText.rectangular ? PasteShape::rectangular : PasteShape::stream);
- pdoc->EndUndoAction();
+ {
+ UndoGroup ug(pdoc);
+ ClearSelection(false);
+ InsertPasteShape(selectedText.Data(), selectedText.Length(),
+ selectedText.rectangular ? PasteShape::rectangular : PasteShape::stream);
+ }
Redraw();
EnsureCaretVisible();