diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-10-21 15:46:17 +0000 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-10-21 15:46:17 +0000 |
commit | abb5955abc9108da050495a923756d6efb4cbb0f (patch) | |
tree | b56e8a4989eca9e395bcb662420c1f300f6ae051 /scintilla/src | |
parent | a0735d103bf46716fd7adf2551b2d52a1a41faef (diff) | |
download | notepad2-mod-abb5955abc9108da050495a923756d6efb4cbb0f.zip notepad2-mod-abb5955abc9108da050495a923756d6efb4cbb0f.tar.gz notepad2-mod-abb5955abc9108da050495a923756d6efb4cbb0f.tar.bz2 |
update scintilla
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@582 28bd50df-7adb-d945-0439-6e466c6a13cc
Diffstat (limited to 'scintilla/src')
-rw-r--r-- | scintilla/src/Editor.cxx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index eb320e4..efec431 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -4513,14 +4513,12 @@ void Editor::NotifySavePoint(Document *, void *, bool atSavePoint) { void Editor::CheckModificationForWrap(DocModification mh) {
if (mh.modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) {
llc.Invalidate(LineLayout::llCheckTextAndStyle);
+ int lineDoc = pdoc->LineFromPosition(mh.position);
+ int lines = Platform::Maximum(0, mh.linesAdded);
if (wrapState != eWrapNone) {
- int lineDoc = pdoc->LineFromPosition(mh.position);
- int lines = Platform::Maximum(0, mh.linesAdded);
NeedWrapping(lineDoc, lineDoc + lines + 1);
}
// Fix up annotation heights
- int lineDoc = pdoc->LineFromPosition(mh.position);
- int lines = Platform::Maximum(0, mh.linesAdded);
SetAnnotationHeights(lineDoc, lineDoc + lines + 2);
}
}
@@ -6741,8 +6739,22 @@ void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { void Editor::SetAnnotationHeights(int start, int end) {
if (vs.annotationVisible) {
+ bool changedHeight = false;
for (int line=start; line<end; line++) {
- cs.SetHeight(line, pdoc->AnnotationLines(line) + 1);
+ int linesWrapped = 1;
+ if (wrapState != eWrapNone) {
+ AutoSurface surface(this);
+ AutoLineLayout ll(llc, RetrieveLineLayout(line));
+ if (surface && ll) {
+ LayoutLine(line, surface, vs, ll, wrapWidth);
+ linesWrapped = ll->lines;
+ }
+ }
+ if (cs.SetHeight(line, pdoc->AnnotationLines(line) + linesWrapped))
+ changedHeight = true;
+ }
+ if (changedHeight) {
+ Redraw();
}
}
}
|