aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-05-03 12:53:13 +1000
committerNeil <nyamatongwe@gmail.com>2014-05-03 12:53:13 +1000
commitf2f9466cff10eef54bd165bbfb99bbcc707a0cf4 (patch)
treedc5e982fd477996c745a35ad0569ea2e0393f944 /src/Editor.cxx
parentc985bfbe6de31c510fada1bacccabf338e577c30 (diff)
downloadscintilla-mirror-f2f9466cff10eef54bd165bbfb99bbcc707a0cf4.tar.gz
Convenience Point constructor from integers as common source of shapes.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index aefca0a85..e96588023 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1163,13 +1163,13 @@ void Editor::MoveCaretInsideView(bool ensureVisible) {
Point pt = PointMainCaret();
if (pt.y < rcClient.top) {
MovePositionTo(SPositionFromLocation(
- Point(lastXChosen - xOffset, rcClient.top),
+ Point(lastXChosen - xOffset, static_cast<int>(rcClient.top)),
false, false, UserVirtualSpace()),
Selection::noSel, ensureVisible);
} else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) {
int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight;
MovePositionTo(SPositionFromLocation(
- Point(lastXChosen - xOffset, rcClient.top + yOfLastLineFullyDisplayed),
+ Point(lastXChosen - xOffset, static_cast<int>(rcClient.top) + yOfLastLineFullyDisplayed),
false, false, UserVirtualSpace()),
Selection::noSel, ensureVisible);
}
@@ -5024,7 +5024,7 @@ void Editor::PageMove(int direction, Selection::selTypes selt, bool stuttered) {
topLineNew = Platform::Clamp(
topLine + direction * LinesToScroll(), 0, MaxScrollPos());
newPos = SPositionFromLocation(
- Point(lastXChosen - xOffset, pt.y + direction * (vs.lineHeight * LinesToScroll())),
+ Point(lastXChosen - xOffset, static_cast<int>(pt.y) + direction * (vs.lineHeight * LinesToScroll())),
false, false, UserVirtualSpace());
}