diff options
author | Marko Njezic <unknown> | 2011-06-20 13:33:27 +0200 |
---|---|---|
committer | Marko Njezic <unknown> | 2011-06-20 13:33:27 +0200 |
commit | aa198d68b4f938a20aadfb53267fab87f64a7004 (patch) | |
tree | 6d9a1997073423063500f0f9ad51da06566469ca /src/Editor.cxx | |
parent | b8c03bfcdda07e63becf660244f977a0e10d8c5b (diff) | |
download | scintilla-mirror-aa198d68b4f938a20aadfb53267fab87f64a7004.tar.gz |
Properly highlight fold markers on sub lines. Bug #3323015.
This complements fold markers highlighting change from revision 3619,
which only fixed part of the problem.
Changes from revision 3620 have been reverted, as they cause line to be drawn
out of bounds and overlap with previously drawn marker above.
They are also no longer needed, with this change.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index f618c78de..26c260101 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1930,18 +1930,23 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (marks) { for (int markBit = 0; (markBit < 32) && marks; markBit++) { if (marks & 1) { - LineMarker::typeOfFold tFold; + LineMarker::typeOfFold tFold = LineMarker::undefined; if (!highlightDelimiter.isCurrentBlockHighlight(lineDoc)) { tFold = LineMarker::undefined; } else if (highlightDelimiter.isBodyBlockFold(lineDoc)) { tFold = LineMarker::body; } else if (highlightDelimiter.isHeadBlockFold(lineDoc)) { - tFold = LineMarker::head; + if (firstSubLine) { + tFold = LineMarker::head; + } else { + if (cs.GetExpanded(lineDoc)) { + tFold = LineMarker::body; + } else { + tFold = LineMarker::undefined; + } + } } else if (highlightDelimiter.isTailBlockFold(lineDoc)) { tFold = LineMarker::tail; - } else { - //Normally, this branch is never used. But I prefer to manage it anyway. - tFold = LineMarker::undefined; } vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font, tFold); } |