aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index c60825e04..fce7308c3 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1188,8 +1188,8 @@ void ScintillaCocoa::DragScroll() {
// TODO: does not work for wrapped lines, fix it.
Sci::Line line = static_cast<Sci::Line>(pdoc->LineFromPosition(posDrag.Position()));
- Sci::Line currentVisibleLine = cs.DisplayFromDoc(line);
- Sci::Line lastVisibleLine = std::min(topLine + LinesOnScreen(), cs.LinesDisplayed()) - 2;
+ Sci::Line currentVisibleLine = pcs->DisplayFromDoc(line);
+ Sci::Line lastVisibleLine = std::min(topLine + LinesOnScreen(), pcs->LinesDisplayed()) - 2;
if (currentVisibleLine <= topLine && topLine > 0)
ScrollTo(topLine - scrollSpeed);
@@ -1853,7 +1853,7 @@ bool ScintillaCocoa::SetScrollingSize(void) {
NSScrollView *scrollView = ScrollContainer();
NSClipView *clipView = ScrollContainer().contentView;
NSRect clipRect = clipView.bounds;
- CGFloat docHeight = cs.LinesDisplayed() * vs.lineHeight;
+ CGFloat docHeight = pcs->LinesDisplayed() * vs.lineHeight;
if (!endAtLastLine)
docHeight += (int(scrollView.bounds.size.height / vs.lineHeight)-3) * vs.lineHeight;
// Allow extra space so that last scroll position places whole line at top