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
commit5dc15089ae075bd105fc2b81f3b5e4fd3c03bf9f (patch)
treec1833e802e0b402af62c6c204bf9e9723ef0e3ce /cocoa
parent14673a9b38a850a8b5a94e4dd73930f22892dd0f (diff)
downloadscintilla-mirror-5dc15089ae075bd105fc2b81f3b5e4fd3c03bf9f.tar.gz
Backport: Use an interface for ContractionState so that there can be different
implementations of that interface. Backport of changeset 6656:ffa2a06d3987.
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 c255c97c9..0769926b6 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1236,8 +1236,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);
@@ -1949,7 +1949,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