aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-27 13:51:21 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-27 13:51:21 +1100
commitfb9f493960b075b034b18d61036d36f384f2e3f8 (patch)
treed30067e494888c0fc76f78b7d3f7bb78c9ffc15a /cocoa
parentccfaed3e4d322b1aebedbe5e42f315434af94459 (diff)
downloadscintilla-mirror-fb9f493960b075b034b18d61036d36f384f2e3f8.tar.gz
Use an interface for ContractionState so that there can be different
implementations of that interface.
Diffstat (limited to 'cocoa')
-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