diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-05 08:32:58 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-05 08:32:58 +1100 |
commit | 006b224af96d10452655ecced49ba3859c1d62ab (patch) | |
tree | 3fc3107e8819d4955eaf6ca325098d883d914c5f /src/EditView.cxx | |
parent | a5b810a701d3dd4b9b717d5ba036aef6d7f34445 (diff) | |
download | scintilla-mirror-006b224af96d10452655ecced49ba3859c1d62ab.tar.gz |
Feature [feature-requests:#1272]. Add API to set default fold display text.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 91d5da13d..a26412954 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1048,7 +1048,7 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle rcSegment.left = rcLine.left; rcSegment.right = rcLine.right; - const bool fillRemainder = !lastSubLine || model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_HIDDEN || !model.pcs->GetFoldDisplayTextShown(line); + const bool fillRemainder = !lastSubLine || !model.GetFoldDisplayText(line); if (fillRemainder) { // Fill the remainder of the line FillLineRemainder(surface, model, vsDraw, ll, line, rcSegment, subLine); @@ -1196,11 +1196,12 @@ void EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, con if (!lastSubLine) return; - if ((model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_HIDDEN) || !model.pcs->GetFoldDisplayTextShown(line)) + const char *text = model.GetFoldDisplayText(line); + if (!text) return; PRectangle rcSegment = rcLine; - const std::string_view foldDisplayText = model.pcs->GetFoldDisplayText(line); + const std::string_view foldDisplayText(text); FontAlias fontText = vsDraw.styles[STYLE_FOLDDISPLAYTEXT].font; const int widthFoldDisplayText = static_cast<int>(surface->WidthText(fontText, foldDisplayText)); |