diff options
| author | nyamatongwe <unknown> | 2000-07-13 05:42:06 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2000-07-13 05:42:06 +0000 | 
| commit | e3cc6be8d4b82f65c747ffba1f1c193714de644a (patch) | |
| tree | a6ad72e62cf597851024a6de6db45d5d05e5f172 /src/Editor.cxx | |
| parent | 26eb24b3c2d823cab8492353a2ff1f217d3d176c (diff) | |
| download | scintilla-mirror-e3cc6be8d4b82f65c747ffba1f1c193714de644a.tar.gz | |
Showing selection in grey when its not the primary selection on GTK+.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 16 | 
1 files changed, 12 insertions, 4 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 487a4c4f7..3f721d57e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -61,7 +61,8 @@ Editor::Editor() {  	selType = selStream;  	xStartSelect = 0;  	xEndSelect = 0; - +	primarySelection = true; +	  	caretPolicy = CARET_SLOP;  	caretSlop = 0; @@ -842,8 +843,12 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis  			Font &textFont = vsDraw.styles[styleMain].font;  			bool inSelection = (iDoc >= ll.selStart) && (iDoc < ll.selEnd) && (ll.selStart != ll.selEnd);  			if (inSelection) { -				if (vsDraw.selbackset) -					textBack = vsDraw.selbackground.allocated; +				if (vsDraw.selbackset) { +					if (primarySelection) +						textBack = vsDraw.selbackground.allocated; +					else +						textBack = vsDraw.selbackground2.allocated; +				}  				if (vsDraw.selforeset)  					textFore = vsDraw.selforeground.allocated;  			} else { @@ -981,7 +986,10 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis  	rcSegment.right = xEol + vsDraw.aveCharWidth + xStart;  	bool eolInSelection = (posLineEnd > ll.selStart) && (posLineEnd <= ll.selEnd) && (ll.selStart != ll.selEnd);  	if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal()-1)) { -		surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); +		if (primarySelection) +			surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); +		else +			surface->FillRectangle(rcSegment, vsDraw.selbackground2.allocated);  	} else if (marks) {  		surface->FillRectangle(rcSegment, markBack);  	} else { | 
