aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 6fd4c44af..87a0391b4 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -6509,8 +6509,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return pdoc->LineEnd(wParam);
case SCI_SETCODEPAGE:
- pdoc->dbcsCodePage = wParam;
- InvalidateStyleRedraw();
+ if (ValidCodePage(wParam)) {
+ pdoc->dbcsCodePage = wParam;
+ InvalidateStyleRedraw();
+ }
break;
case SCI_GETCODEPAGE: