From 794c599d481e46dbf9a5251a57fafb528b3fff2d Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 22 Mar 2021 12:56:26 +1100 Subject: Replace multiple mode setting calls on Surface with SetMode as this is extensible. For CallTip, GTK and Qt hardcode BidiR2L to false as they don't support bidirectional, its the same as current, and the BidiR2L state on EditModel isn't easily accessible. --- win32/ScintillaWin.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 44d08af71..4a8d1c5e9 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -3492,9 +3492,7 @@ LRESULT PASCAL ScintillaWin::CTWndProc( } #endif } - surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == sciThis->ct.codePage); - surfaceWindow->SetDBCSMode(sciThis->ct.codePage); - surfaceWindow->SetBidiR2L(sciThis->BidirectionalR2L()); + surfaceWindow->SetMode(SurfaceMode(sciThis->ct.codePage, sciThis->BidirectionalR2L())); sciThis->ct.PaintCT(surfaceWindow.get()); #if defined(USE_D2D) if (pCTRenderTarget) -- cgit v1.2.3