diff options
author | uhf7 <unknown> | 2020-08-26 23:03:13 +1000 |
---|---|---|
committer | uhf7 <unknown> | 2020-08-26 23:03:13 +1000 |
commit | 424dbda14217388ab16878196ef049edf916225d (patch) | |
tree | 28ef3e19b31e71a714e7e1e12187b6f18230a1aa | |
parent | b381c8fd700c2cf80e49ea77c6a5f1a3281bc3f5 (diff) | |
download | scintilla-mirror-424dbda14217388ab16878196ef049edf916225d.tar.gz |
Backport: Bug [#2199]. Fixed bug where a hovered INDIC_TEXTFORE indicator was not applying
the hover colour to the whole range.
Backport of changeset 8509:fc1c341a2339.
-rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
-rw-r--r-- | src/EditView.cxx | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index c0eb117a7..093e5366c 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -593,6 +593,11 @@ <a href="https://sourceforge.net/p/scintilla/bugs/2193/">Bug #2193</a>. </li> <li> + Fixed bug where a hovered INDIC_TEXTFORE indicator was not applying the hover + colour to the whole range. + <a href="https://sourceforge.net/p/scintilla/bugs/2199/">Bug #2199</a>. + </li> + <li> Fixed bug where gradient indicators were not showing hovered appearance. </li> <li> diff --git a/src/EditView.cxx b/src/EditView.cxx index 2677cd7e4..d18a9b4eb 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1764,9 +1764,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; |