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. --- src/Editor.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Editor.h b/src/Editor.h index d4f997af6..20f2c53a4 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -653,18 +653,14 @@ public: if (ed->wMain.GetID()) { surf = Surface::Allocate(technology != -1 ? technology : ed->technology); surf->Init(ed->wMain.GetID()); - surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); - surf->SetDBCSMode(ed->CodePage()); - surf->SetBidiR2L(ed->BidirectionalR2L()); + surf->SetMode(SurfaceMode(ed->CodePage(), ed->BidirectionalR2L())); } } AutoSurface(SurfaceID sid, Editor *ed, int technology = -1) { if (ed->wMain.GetID()) { surf = Surface::Allocate(technology != -1 ? technology : ed->technology); surf->Init(sid, ed->wMain.GetID()); - surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); - surf->SetDBCSMode(ed->CodePage()); - surf->SetBidiR2L(ed->BidirectionalR2L()); + surf->SetMode(SurfaceMode(ed->CodePage(), ed->BidirectionalR2L())); } } // Deleted so AutoSurface objects can not be copied. -- cgit v1.2.3