MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / SetHotSpotRange

Method SetHotSpotRange

scintilla/src/Editor.cxx:6630–6660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6628}
6629
6630void Editor::SetHotSpotRange ( Point *pt )
6631{
6632 if ( pt ) {
6633 int pos = PositionFromLocation ( *pt );
6634 // If we don't limit this to word characters then the
6635 // range can encompass more than the run range and then
6636 // the underline will not be drawn properly.
6637 int hsStart_ = pdoc->ExtendStyleRange ( pos, -1, vs.hotspotSingleLine );
6638 int hsEnd_ = pdoc->ExtendStyleRange ( pos, 1, vs.hotspotSingleLine );
6639 // Only invalidate the range if the hotspot range has changed...
6640 if ( hsStart_ != hsStart || hsEnd_ != hsEnd ) {
6641 if ( hsStart != -1 ) {
6642 InvalidateRange ( hsStart, hsEnd );
6643 }
6644 hsStart = hsStart_;
6645 hsEnd = hsEnd_;
6646 InvalidateRange ( hsStart, hsEnd );
6647 }
6648 } else {
6649 if ( hsStart != -1 ) {
6650 int hsStart_ = hsStart;
6651 int hsEnd_ = hsEnd;
6652 hsStart = -1;
6653 hsEnd = -1;
6654 InvalidateRange ( hsStart_, hsEnd_ );
6655 } else {
6656 hsStart = -1;
6657 hsEnd = -1;
6658 }
6659 }
6660}
6661
6662void Editor::GetHotSpotRange ( int &hsStart_, int &hsEnd_ )
6663{

Callers

nothing calls this directly

Calls 1

ExtendStyleRangeMethod · 0.80

Tested by

no test coverage detected