diff options
author | nyamatongwe <unknown> | 2003-10-31 11:02:04 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-10-31 11:02:04 +0000 |
commit | 40780f412ede5e9a0aee4378d22909172ad3ace3 (patch) | |
tree | 117ba958d21c2ed6ab02748e9ba5ea3636cba445 /src | |
parent | 9dce436839f6e6df327bac824f2e84dc911af869 (diff) | |
download | scintilla-mirror-40780f412ede5e9a0aee4378d22909172ad3ace3.tar.gz |
Another wrapping fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 06ca56366..b1811e075 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3494,7 +3494,9 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { } else { cs.DeleteLines(lineOfPos, -mh.linesAdded); } - CheckModificationForWrap(mh); + } + CheckModificationForWrap(mh); + if (mh.linesAdded != 0) { // Avoid scrolling of display if change before current display if (mh.position < posTopLine) { int newTop = Platform::Clamp(topLine + mh.linesAdded, 0, MaxScrollPos()); @@ -6166,8 +6168,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_SETMARGINWIDTHN: if (ValidMargin(wParam)) { - vs.ms[wParam].width = lParam; - InvalidateStyleRedraw(); + // Short-circuit if the width is unchanged, to avoid unnecessary redraw. + if (vs.ms[wParam].width != lParam) { + vs.ms[wParam].width = lParam; + InvalidateStyleRedraw(); + } } break; |