diff options
| author | Neil <nyamatongwe@gmail.com> | 2013-12-27 13:06:56 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2013-12-27 13:06:56 +1100 | 
| commit | 0c15f5d97dde9c1bcd91bf4ff9436a4b6b50ef2b (patch) | |
| tree | 43bbe38cdac9764824e7dde321457e8f949de4d0 /src | |
| parent | ed696c1132678e3a5cf46a69282676acd7eed022 (diff) | |
| download | scintilla-mirror-0c15f5d97dde9c1bcd91bf4ff9436a4b6b50ef2b.tar.gz | |
Ensure caret is visible after scroll.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index da6b2eab3..7bc142ee3 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1488,9 +1488,9 @@ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange rang  		}  		// In case of a jump (find result) largely out of display, adjust the offset to display the caret  		if (pt.x + xOffset < rcClient.left + newXY.xOffset) { -			newXY.xOffset = pt.x + xOffset - rcClient.left; +			newXY.xOffset = pt.x + xOffset - rcClient.left - 2;  		} else if (pt.x + xOffset >= rcClient.right + newXY.xOffset) { -			newXY.xOffset = pt.x + xOffset - rcClient.right + 1; +			newXY.xOffset = pt.x + xOffset - rcClient.right + 2;  			if (vs.caretStyle == CARETSTYLE_BLOCK) {  				// Ensure we can see a good portion of the block caret  				newXY.xOffset += static_cast<int>(vs.aveCharWidth); | 
