From fb9f493960b075b034b18d61036d36f384f2e3f8 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 27 Mar 2018 13:51:21 +1100 Subject: Use an interface for ContractionState so that there can be different implementations of that interface. --- cocoa/ScintillaCocoa.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cocoa') 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(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 -- cgit v1.2.3