diff options
author | Zufu Liu <unknown> | 2018-09-29 08:00:50 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2018-09-29 08:00:50 +1000 |
commit | 035866f45bae0c8193b0f9e30a0898e5fd33ca10 (patch) | |
tree | ae87be2a22f6a9e2fedaa99f2244c137e7b55269 | |
parent | 645840edc9a64128f2a4d79c4da6db00ce47cf0b (diff) | |
download | scintilla-mirror-035866f45bae0c8193b0f9e30a0898e5fd33ca10.tar.gz |
Bug [#2047]. Avoid processing when SCI_SETZOOM to same value as before.
-rw-r--r-- | src/Editor.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 3093e6c57..ab8f1dba3 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7556,11 +7556,15 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { InvalidateStyleRedraw(); break; - case SCI_SETZOOM: - vs.zoomLevel = static_cast<int>(wParam); - InvalidateStyleRedraw(); - NotifyZoom(); - break; + case SCI_SETZOOM: { + const int zoomLevel = static_cast<int>(wParam); + if (zoomLevel != vs.zoomLevel) { + vs.zoomLevel = zoomLevel; + InvalidateStyleRedraw(); + NotifyZoom(); + } + break; + } case SCI_GETZOOM: return vs.zoomLevel; |