diff options
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;  | 
