diff options
| author | Zufu Liu <unknown> | 2021-08-27 08:21:16 +1000 | 
|---|---|---|
| committer | Zufu Liu <unknown> | 2021-08-27 08:21:16 +1000 | 
| commit | 6a4ba450a78154a10360a43b6f36cb2c11d1c955 (patch) | |
| tree | 12f7ff8eabd79576205af9f4517e2d7bd2252e1b /src/EditView.cxx | |
| parent | bb75e40bca7a6d81eb4070a7b67950119dc4b8b5 (diff) | |
| download | scintilla-mirror-6a4ba450a78154a10360a43b6f36cb2c11d1c955.tar.gz | |
Feature [feature-requests:#841] Remove hotspot from LineLayout and rely on
reference to model.
Diffstat (limited to 'src/EditView.cxx')
| -rw-r--r-- | src/EditView.cxx | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/src/EditView.cxx b/src/EditView.cxx index b0b87a9b1..0f69dd7b3 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1766,7 +1766,7 @@ void EditView::DrawBackground(Surface *surface, const EditModel &model, const Vi  				rcSegment.right = rcLine.right;  			const InSelection inSelection = hideSelection ? InSelection::inNone : model.sel.CharacterInSelection(iDoc); -			const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); +			const bool inHotspot = model.hotspot.Valid() && model.hotspot.ContainsCharacter(iDoc);  			ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, inSelection,  				inHotspot, ll->styles[i], i);  			if (ts.representation) { @@ -1977,7 +1977,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi  			ColourRGBA textFore = vsDraw.styles[styleMain].fore;  			const Font *textFont = vsDraw.styles[styleMain].font.get();  			// Hot-spot foreground -			const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); +			const bool inHotspot = model.hotspot.Valid() && model.hotspot.ContainsCharacter(iDoc);  			if (inHotspot) {  				if (vsDraw.ElementColour(Element::HotSpotActive))  					textFore = *vsDraw.ElementColour(Element::HotSpotActive); @@ -2124,7 +2124,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi  					}  				}  			} -			if (ll->hotspot.Valid() && vsDraw.hotspotUnderline && ll->hotspot.ContainsCharacter(iDoc)) { +			if (inHotspot && vsDraw.hotspotUnderline) {  				PRectangle rcUL = rcSegment;  				rcUL.top = rcUL.top + vsDraw.maxAscent + 1;  				rcUL.bottom = rcUL.top + 1; @@ -2411,7 +2411,6 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan  				if (ll) {  					ll->containsCaret = !hideSelection && (lineDoc == lineCaret)  						&& (ll->lines == 1 || !vsDraw.caretLine.subLine || ll->InLine(caretOffset, subLine)); -					ll->hotspot = model.GetHotSpotRange();  					PRectangle rcLine = rcTextArea;  					rcLine.top = static_cast<XYPOSITION>(ypos); | 
