aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZufu Liu <unknown>2018-09-29 08:00:50 +1000
committerZufu Liu <unknown>2018-09-29 08:00:50 +1000
commitdfcca8a13a38581fcf2eb15fbeaee491779f865c (patch)
tree099d22e190d20c1cce8a93fe97ade6be0910972c
parent287285fa7def8bef54885d596b4cbef234d3f34a (diff)
downloadscintilla-mirror-dfcca8a13a38581fcf2eb15fbeaee491779f865c.tar.gz
Backport: Bug [#2047]. Avoid processing when SCI_SETZOOM to same value as before.
Backport of changeset 7097:3276140e9d55.
-rw-r--r--src/Editor.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 53ec6794f..d3c1b5dd8 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7544,11 +7544,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;