aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2017-09-13 11:27:44 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2017-09-13 11:27:44 +1000
commit41a4aaf6ac518707850beee6158ab232d1bf7d03 (patch)
treecb9bfb9457ca8e795565a42825d2c9de0d827691 /src/Editor.cxx
parent4fd00bf67d398898a5fa53d7945e5714ceb9e1e1 (diff)
downloadscintilla-mirror-41a4aaf6ac518707850beee6158ab232d1bf7d03.tar.gz
Backport: Bug [#1971]. Fix line selection by clicking in the margin when scrolled.
Backport of changeset 6389:96506cab38bd.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 766d0fac2..80b1d7ad3 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<XYPOSITION>(vs.textStart - vs.leftMarginWidth);
rcSelMargin.left = static_cast<XYPOSITION>(vs.textStart - vs.fixedColumnWidth);
+ const Point ptOrigin = GetVisibleOriginInMain();
+ rcSelMargin.Move(0, -ptOrigin.y);
return rcSelMargin.ContainsWholePixel(pt);
} else {
return false;