diff options
author | Neil <nyamatongwe@gmail.com> | 2022-07-31 22:21:57 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-07-31 22:21:57 +1000 |
commit | d38429108f2035d9fab0919271f6715cd1b7eda6 (patch) | |
tree | 014b3bf217785e26e4c8db514fedf380d3bb007a /src/MarginView.cxx | |
parent | 926cb6f7d228b347db16a45e1f2632da475da1f0 (diff) | |
download | scintilla-mirror-d38429108f2035d9fab0919271f6715cd1b7eda6.tar.gz |
Add SC_MARK_BAR marker and INDIC_POINT_TOP indicator which are useful for change
history. Tweak size of INDIC_POINT and INDIC_POINTCHARACTER. Let translucency of
INDIC_COMPOSITIONTHICK be adjusted.
Diffstat (limited to 'src/MarginView.cxx')
-rw-r--r-- | src/MarginView.cxx | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/MarginView.cxx b/src/MarginView.cxx index 7d2f4a8cd..6e43c0f0c 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -283,7 +283,11 @@ void MarginView::PaintOneMargin(Surface *surface, PRectangle rc, PRectangle rcOn const bool firstSubLine = visibleLine == firstVisibleLine; const bool lastSubLine = visibleLine == lastVisibleLine; - int marks = firstSubLine ? model.GetMark(lineDoc) : 0; + int marks = model.GetMark(lineDoc); + if (!firstSubLine) { + // Mask off non-continuing marks + marks = marks & vs.maskDrawWrapped; + } bool headWithTail = false; @@ -413,6 +417,24 @@ void MarginView::PaintOneMargin(Surface *surface, PRectangle rc, PRectangle rcOn part = LineMarker::FoldPart::tail; } } + if (vs.markers[markBit].markType == MarkerSymbol::Bar) { + const int mask = 1 << markBit; + const bool markBefore = firstSubLine ? (model.GetMark(lineDoc-1) & mask) : true; + const bool markAfter = lastSubLine ? (model.GetMark(lineDoc+1) & mask) : true; + if (markBefore) { + if (markAfter) { + part = LineMarker::FoldPart::body; + } else { + part = LineMarker::FoldPart::tail; + } + } else { + if (markAfter) { + part = LineMarker::FoldPart::head; + } else { + part = LineMarker::FoldPart::headWithTail; + } + } + } vs.markers[markBit].Draw(surface, rcMarker, vs.styles[StyleLineNumber].font.get(), part, marginStyle.style); } marks >>= 1; |