From baff47cdde385cc15b39ab93fca5f41db795d6bc Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sat, 5 Mar 2022 20:13:08 +1100 Subject: Feature [feature-requests:#1432] Simplify setting surface modes with EditModel::CurrentSurfaceMode. --- cocoa/ScintillaCocoa.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cocoa') diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 09357eb39..e8723f318 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1100,7 +1100,7 @@ void ScintillaCocoa::CTPaint(void *gc, NSRect rc) { #pragma unused(rc) std::unique_ptr surfaceWindow(Surface::Allocate(Technology::Default)); surfaceWindow->Init(gc, wMain.GetID()); - surfaceWindow->SetMode(SurfaceMode(ct.codePage, BidirectionalR2L())); + surfaceWindow->SetMode(CurrentSurfaceMode()); ct.PaintCT(surfaceWindow.get()); surfaceWindow->Release(); } @@ -1456,7 +1456,7 @@ void ScintillaCocoa::StartDrag() { // To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface. SurfaceImpl si; - si.SetMode(SurfaceMode(CodePage(), BidirectionalR2L())); + si.SetMode(CurrentSurfaceMode()); std::unique_ptr sw = si.AllocatePixMapImplementation(static_cast(client.Width()), static_cast(client.Height())); const bool lastHideSelection = view.hideSelection; -- cgit v1.2.3