diff options
| author | Neil <nyamatongwe@gmail.com> | 2021-04-26 15:31:13 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2021-04-26 15:31:13 +1000 | 
| commit | baff93d6117396c57dbffbd28e69fde92712a88a (patch) | |
| tree | 81408b42ca0c38ab288c84c45530c73385eb8aa0 /src | |
| parent | 81f7847af4cc9f51f02ab191c73f394c457518bd (diff) | |
| download | scintilla-mirror-baff93d6117396c57dbffbd28e69fde92712a88a.tar.gz | |
Move hotspotSingleLine from ViewStyle to EditModel as it defines behaviour, not
appearance.
Diffstat (limited to 'src')
| -rw-r--r-- | src/EditModel.cxx | 1 | ||||
| -rw-r--r-- | src/EditModel.h | 1 | ||||
| -rw-r--r-- | src/Editor.cxx | 8 | ||||
| -rw-r--r-- | src/ViewStyle.cxx | 2 | ||||
| -rw-r--r-- | src/ViewStyle.h | 1 | 
5 files changed, 6 insertions, 7 deletions
diff --git a/src/EditModel.cxx b/src/EditModel.cxx index 11827c471..013f848ba 100644 --- a/src/EditModel.cxx +++ b/src/EditModel.cxx @@ -72,6 +72,7 @@ EditModel::EditModel() : braces{} {  	foldFlags = 0;  	foldDisplayTextStyle = SC_FOLDDISPLAYTEXT_HIDDEN;  	hotspot = Range(Sci::invalidPosition); +	hotspotSingleLine = true;  	hoverIndicatorPos = Sci::invalidPosition;  	wrapWidth = LineLayout::wrapWidthInfinite;  	pdoc = new Document(SC_DOCUMENTOPTION_DEFAULT); diff --git a/src/EditModel.h b/src/EditModel.h index f81ecb0c1..7934a0720 100644 --- a/src/EditModel.h +++ b/src/EditModel.h @@ -46,6 +46,7 @@ public:  	std::unique_ptr<IContractionState> pcs;  	// Hotspot support  	Range hotspot; +	bool hotspotSingleLine;  	Sci::Position hoverIndicatorPos;  	// Wrapping support diff --git a/src/Editor.cxx b/src/Editor.cxx index f241bf346..5dabfe6ad 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4760,8 +4760,8 @@ void Editor::SetHotSpotRange(const Point *pt) {  		// range can encompass more than the run range and then  		// the underline will not be drawn properly.  		Range hsNew; -		hsNew.start = pdoc->ExtendStyleRange(pos, -1, vs.hotspotSingleLine); -		hsNew.end = pdoc->ExtendStyleRange(pos, 1, vs.hotspotSingleLine); +		hsNew.start = pdoc->ExtendStyleRange(pos, -1, hotspotSingleLine); +		hsNew.end = pdoc->ExtendStyleRange(pos, 1, hotspotSingleLine);  		// Only invalidate the range if the hotspot range has changed...  		if (!(hsNew == hotspot)) { @@ -8046,12 +8046,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		return vs.hotspotUnderline ? 1 : 0;  	case SCI_SETHOTSPOTSINGLELINE: -		vs.hotspotSingleLine = wParam != 0; +		hotspotSingleLine = wParam != 0;  		InvalidateStyleRedraw();  		break;  	case SCI_GETHOTSPOTSINGLELINE: -		return vs.hotspotSingleLine ? 1 : 0; +		return hotspotSingleLine ? 1 : 0;  	case SCI_SETPASTECONVERTENDINGS:  		convertPastes = wParam != 0; diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index d4de3a6f5..56cfcf188 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -96,7 +96,6 @@ ViewStyle::ViewStyle(const ViewStyle &source) : markers(MARKER_MAX + 1), indicat  	hotspotColours = source.hotspotColours;  	hotspotUnderline = source.hotspotUnderline; -	hotspotSingleLine = source.hotspotSingleLine;  	whitespaceColours = source.whitespaceColours;  	controlCharSymbol = source.controlCharSymbol; @@ -248,7 +247,6 @@ void ViewStyle::Init(size_t stylesSize_) {  	hotspotColours.fore.reset();  	hotspotColours.back.reset();  	hotspotUnderline = true; -	hotspotSingleLine = true;  	leftMarginWidth = 1;  	rightMarginWidth = 1; diff --git a/src/ViewStyle.h b/src/ViewStyle.h index c9fe6bc98..e672acd8c 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -111,7 +111,6 @@ public:  	std::optional<ColourAlpha> foldmarginHighlightColour;  	ForeBackColours hotspotColours;  	bool hotspotUnderline; -	bool hotspotSingleLine;  	/// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin  	int leftMarginWidth;	///< Spacing margin on left of text  	int rightMarginWidth;	///< Spacing margin on right of text  | 
