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 /src/Editor.h | |
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 'src/Editor.h')
-rw-r--r-- | src/Editor.h | 8 |
1 files changed, 2 insertions, 6 deletions
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. |