diff options
| author | nyamatongwe <unknown> | 2000-11-05 10:02:57 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2000-11-05 10:02:57 +0000 | 
| commit | 24c42b17885725eb69f18144bb5588679d8e896e (patch) | |
| tree | a373ea7220740f4c7d9566cb794dfdcba8090358 /src/Editor.cxx | |
| parent | 984282e39f956a118564fec4d9972583f8cd16d0 (diff) | |
| download | scintilla-mirror-24c42b17885725eb69f18144bb5588679d8e896e.tar.gz | |
Avoid scrolling when mouse down near right margin and scolled to left.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 8 | 
1 files changed, 2 insertions, 6 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 6bc105054..dd4551735 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -548,9 +548,8 @@ void Editor::MoveCaretInsideView() {  	}  } -  void Editor::EnsureCaretVisible(bool useMargin) { -	//Platform::DebugPrintf("EnsureCaretVisible %d\n", xOffset); +    //Platform::DebugPrintf("EnsureCaretVisible %d %s\n", xOffset, useMargin ? " margin" : " ");  	PRectangle rcClient = GetTextRectangle();  	//int rcClientFullWidth = rcClient.Width();  	int posCaret = currentPos; @@ -601,7 +600,7 @@ void Editor::EnsureCaretVisible(bool useMargin) {  	int xOffsetNew = xOffset;  	if (pt.x < rcClient.left) {  		xOffsetNew = xOffset - (rcClient.left - pt.x); -	} else if (xOffset > 0 || pt.x >= rcClient.right) { +	} else if (((xOffset > 0) && useMargin) || pt.x >= rcClient.right) {  		xOffsetNew = xOffset + (pt.x - rcClient.right);  		int xOffsetEOL = xOffset + (ptEOL.x - rcClient.right) - xMargin + 2;  		//Platform::DebugPrintf("Margin %d %d\n", xOffsetNew, xOffsetEOL); @@ -2814,9 +2813,6 @@ void Editor::ButtonMove(Point pt) {  				DisplayCursor(Window::cursorReverseArrow);  				return ; 	// No need to test for selection  			} - - -  		}  		// Display regular (drag) cursor over selection  		if (PointInSelection(pt)) | 
