diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-22 12:56:26 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-22 12:56:26 +1100 |
commit | 794c599d481e46dbf9a5251a57fafb528b3fff2d (patch) | |
tree | 0d8b286d6139c23ff6fd8f578c626d7295838910 /cocoa/ScintillaCocoa.mm | |
parent | 240add387904f2630030a8b2665cadb8babf6153 (diff) | |
download | scintilla-mirror-794c599d481e46dbf9a5251a57fafb528b3fff2d.tar.gz |
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.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 8e7c80260..4a688bdff 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1058,8 +1058,7 @@ void ScintillaCocoa::CTPaint(void *gc, NSRect rc) { #pragma unused(rc) std::unique_ptr<Surface> surfaceWindow(Surface::Allocate(SC_TECHNOLOGY_DEFAULT)); surfaceWindow->Init(gc, wMain.GetID()); - surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == ct.codePage); - surfaceWindow->SetDBCSMode(ct.codePage); + surfaceWindow->SetMode(SurfaceMode(ct.codePage, BidirectionalR2L())); ct.PaintCT(surfaceWindow.get()); surfaceWindow->Release(); } @@ -1428,8 +1427,7 @@ void ScintillaCocoa::StartDrag() { SurfaceImpl pixmap; pixmap.InitPixMap(static_cast<int>(imageRect.Width()), static_cast<int>(imageRect.Height()), NULL, NULL); - pixmap.SetUnicodeMode(IsUnicodeMode()); - pixmap.SetDBCSMode(CodePage()); + pixmap.SetMode(SurfaceMode(CodePage(), BidirectionalR2L())); CGContextRef gc = pixmap.GetContext(); // To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin |