aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx14
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;