diff --git a/scintilla/src/EditView.cxx b/scintilla/src/EditView.cxx index 0cebe407..361b8982 100644 --- a/scintilla/src/EditView.cxx +++ b/scintilla/src/EditView.cxx @@ -1810,9 +1810,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) || (indicator.sacHover.style == INDIC_EXPLORERLINK)) { textFore = indicator.sacHover.fore;