diff options
author | Neil <nyamatongwe@gmail.com> | 2021-07-29 13:12:16 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-07-29 13:12:16 +1000 |
commit | e8f134e9a1567775377c66c8bd34825380c328a6 (patch) | |
tree | 4f34b87e603b5fa6f4a6d8bdb89b8e1ce2f41b8b /src/EditView.cxx | |
parent | 57f5c36ccf0ddc9be4b348bbe39cf3347ea8381c (diff) | |
download | scintilla-mirror-e8f134e9a1567775377c66c8bd34825380c328a6.tar.gz |
Add SC_ELEMENT_HIDDEN_LINE to show where lines are hidden.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 7eea729fd..e32e791ec 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -2304,6 +2304,17 @@ static void DrawFoldLines(Surface *surface, const EditModel &model, const ViewSt || (!expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterContracted))))) { surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), foldLineColour); + // If contracted fold line drawn then don't overwrite with hidden line + // as fold lines are more specific then hidden lines. + if (!expanded) { + return; + } + } + } + if (lastSubLine && model.pcs->GetVisible(line) && !model.pcs->GetVisible(line + 1)) { + std::optional<ColourRGBA> hiddenLineColour = vsDraw.ElementColour(Element::HiddenLine); + if (hiddenLineColour) { + surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), *hiddenLineColour); } } } |