diff options
author | uhf7 <unknown> | 2020-08-26 23:03:13 +1000 |
---|---|---|
committer | uhf7 <unknown> | 2020-08-26 23:03:13 +1000 |
commit | a4932dda62685856670a782c92d7eebc8afb8bf2 (patch) | |
tree | e8ba2444f198f26fae3fa1be208843b22fd56a11 /src/EditView.cxx | |
parent | 24ba9ee47bb8535f44fbaa7d36f18cfda53eaf44 (diff) | |
download | scintilla-mirror-a4932dda62685856670a782c92d7eebc8afb8bf2.tar.gz |
Bug [#2199]. Fixed bug where a hovered INDIC_TEXTFORE indicator was not applying
the hover colour to the whole range.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 505530054..72f219fae 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1896,9 +1896,12 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi const int indicatorValue = deco->ValueAt(ts.start + posLineStart); if (indicatorValue) { const Indicator &indicator = vsDraw.indicators[deco->Indicator()]; - const bool hover = indicator.IsDynamic() && - ((model.hoverIndicatorPos >= ts.start + posLineStart) && - (model.hoverIndicatorPos <= ts.end() + posLineStart)); + bool hover = false; + if (indicator.IsDynamic()) { + const Sci::Position startPos = ts.start + posLineStart; + const Range rangeRun(deco->StartRun(startPos), deco->EndRun(startPos)); + hover = rangeRun.ContainsCharacter(model.hoverIndicatorPos); + } if (hover) { if (indicator.sacHover.style == INDIC_TEXTFORE) { textFore = indicator.sacHover.fore; |