From a4932dda62685856670a782c92d7eebc8afb8bf2 Mon Sep 17 00:00:00 2001 From: uhf7 Date: Wed, 26 Aug 2020 23:03:13 +1000 Subject: Bug [#2199]. Fixed bug where a hovered INDIC_TEXTFORE indicator was not applying the hover colour to the whole range. --- src/EditView.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/EditView.cxx') 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; -- cgit v1.2.3