Fix hovered indicators issue in Scintilla

Close #8769
This commit is contained in:
Udo Hoffmann 2020-08-26 22:22:49 +02:00 committed by Don HO
parent 648e6eb891
commit a19dc77525

View File

@ -1810,9 +1810,12 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
const int indicatorValue = deco->ValueAt(ts.start + posLineStart); const int indicatorValue = deco->ValueAt(ts.start + posLineStart);
if (indicatorValue) { if (indicatorValue) {
const Indicator &indicator = vsDraw.indicators[deco->Indicator()]; const Indicator &indicator = vsDraw.indicators[deco->Indicator()];
const bool hover = indicator.IsDynamic() && bool hover = false;
((model.hoverIndicatorPos >= ts.start + posLineStart) && if (indicator.IsDynamic()) {
(model.hoverIndicatorPos <= ts.end() + posLineStart)); const Sci::Position startPos = ts.start + posLineStart;
const Range rangeRun(deco->StartRun(startPos), deco->EndRun(startPos));
hover = rangeRun.ContainsCharacter(model.hoverIndicatorPos);
}
if (hover) { if (hover) {
if ((indicator.sacHover.style == INDIC_TEXTFORE) || (indicator.sacHover.style == INDIC_EXPLORERLINK)) { if ((indicator.sacHover.style == INDIC_TEXTFORE) || (indicator.sacHover.style == INDIC_EXPLORERLINK)) {
textFore = indicator.sacHover.fore; textFore = indicator.sacHover.fore;