diff options
author | Marko Njezic <devnull@localhost> | 2011-07-02 13:41:25 +0200 |
---|---|---|
committer | Marko Njezic <devnull@localhost> | 2011-07-02 13:41:25 +0200 |
commit | f650e7fd9d5596e6c165e02ca5defdb4afc90131 (patch) | |
tree | 7c7d85628f2e6f4bf4d57df30f28e5534ca9d1cc /src/LineMarker.cxx | |
parent | 5b3778ece55a12878d505bc4c5bf687206cc2713 (diff) | |
download | scintilla-mirror-f650e7fd9d5596e6c165e02ca5defdb4afc90131.tar.gz |
Folding related fixes. Initiated by bug #3323805.
Make fold highlighting follow closely the actual folding implementation.
Introduce a concept of fold headers with a tail to accommodate certain
fold highlighting situations.
Optimize PaintSelMargin(), so it doesn't waste time with fold markers,
unless really necessary.
Make EnsureLineVisible() find right parent, when called on whitespace line.
Fix wrong fold tail marker when needWhiteClosure is true.
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r-- | src/LineMarker.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 1415c609b..b2b7ceae8 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -84,6 +84,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac switch (tFold) { case LineMarker::head : + case LineMarker::headWithTail : head = backSelected; tail = backSelected; break; @@ -243,7 +244,10 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac DrawPlus(surface, centreX, centreY, blobSize, tail.allocated); } else if (markType == SC_MARK_BOXPLUSCONNECTED) { - surface->PenColour(body.allocated); + if (tFold == LineMarker::headWithTail) + surface->PenColour(tail.allocated); + else + surface->PenColour(body.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); @@ -301,10 +305,14 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac DrawPlus(surface, centreX, centreY, blobSize, tail.allocated); } else if (markType == SC_MARK_CIRCLEPLUSCONNECTED) { - surface->PenColour(body.allocated); + if (tFold == LineMarker::headWithTail) + surface->PenColour(tail.allocated); + else + surface->PenColour(body.allocated); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); + surface->PenColour(body.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); |