From f2b69582ad2e82c506294ae7644be0bf5da88763 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Wed, 13 Sep 2017 11:27:44 +1000 Subject: Bug [#1971]. Fix line selection by clicking in the margin when scrolled. --- doc/ScintillaHistory.html | 4 ++++ src/Editor.cxx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index a4fea6139..0d31e153a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -554,6 +554,10 @@ The SQL lexer uses sql.backslash.escapes for double quoted strings. Bug #1968. +
  • + On Cocoa, fix line selection by clicking in the margin when scrolled. + Bug #1971. +
  • Release 4.0.0 diff --git a/src/Editor.cxx b/src/Editor.cxx index ca069faea..163be5c15 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4320,6 +4320,8 @@ bool Editor::PointInSelMargin(Point pt) const { PRectangle rcSelMargin = GetClientRectangle(); rcSelMargin.right = static_cast(vs.textStart - vs.leftMarginWidth); rcSelMargin.left = static_cast(vs.textStart - vs.fixedColumnWidth); + const Point ptOrigin = GetVisibleOriginInMain(); + rcSelMargin.Move(0, -ptOrigin.y); return rcSelMargin.ContainsWholePixel(pt); } else { return false; -- cgit v1.2.3