From 6763becbfcc14b03e89812bd3ecd74ed9a57e2ba Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 27 Aug 2024 08:08:05 +1000 Subject: Use UndoGroup to ensure action ended if exception occurs. --- win32/ScintillaWin.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index c1b330e61..5fd06cd16 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1167,10 +1167,9 @@ void ScintillaWin::SelectionToHangul() { if (converted) { documentStr = StringEncode(uniStr, CodePageOfDocument()); - pdoc->BeginUndoAction(); + UndoGroup ug(pdoc); ClearSelection(); InsertPaste(&documentStr[0], documentStr.size()); - pdoc->EndUndoAction(); } } } -- cgit v1.2.3