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 | 6aea75304eb832c898cbe6f35f99ff1512920b45 (patch) | |
tree | c119cbc2449e33bffa6f17f0312abbeb1307898a /src/Editor.cxx | |
parent | d895f7dd9933b7d6323063d692a63d0067992b71 (diff) | |
download | scintilla-mirror-6aea75304eb832c898cbe6f35f99ff1512920b45.tar.gz |
Ensure caret is visible after scroll.
Diffstat (limited to 'src/Editor.cxx')
-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); |