aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Editor.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index d25099c1a..7afd3e563 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7142,9 +7142,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return wrapState;
case SCI_SETWRAPVISUALFLAGS:
- wrapVisualFlags = wParam;
- InvalidateStyleRedraw();
- ReconfigureScrollBars();
+ if (wrapVisualFlags != static_cast<int>(wParam)) {
+ wrapVisualFlags = wParam;
+ InvalidateStyleRedraw();
+ ReconfigureScrollBars();
+ }
break;
case SCI_GETWRAPVISUALFLAGS:
@@ -7159,18 +7161,22 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return wrapVisualFlagsLocation;
case SCI_SETWRAPSTARTINDENT:
- wrapVisualStartIndent = wParam;
- InvalidateStyleRedraw();
- ReconfigureScrollBars();
+ if (wrapVisualStartIndent != static_cast<int>(wParam)) {
+ wrapVisualStartIndent = wParam;
+ InvalidateStyleRedraw();
+ ReconfigureScrollBars();
+ }
break;
case SCI_GETWRAPSTARTINDENT:
return wrapVisualStartIndent;
case SCI_SETWRAPINDENTMODE:
- wrapIndentMode = wParam;
- InvalidateStyleRedraw();
- ReconfigureScrollBars();
+ if (wrapIndentMode != static_cast<int>(wParam)) {
+ wrapIndentMode = wParam;
+ InvalidateStyleRedraw();
+ ReconfigureScrollBars();
+ }
break;
case SCI_GETWRAPINDENTMODE: