aboutsummaryrefslogtreecommitdiff
path: root/src/scintilla_backports/6388_96506cab38bd.patch
blob: 5ff68a60f3cd46ede3a01c918110e59fd41c8043 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# HG changeset patch
# User Neil Hodgson <nyamatongwe@gmail.com>
# Date 1505266064 -36000
# Node ID 96506cab38bdbd86feac8a0aa671854091b7610b
# Parent  d62863ae40a38b08b7b1e3bc13a874b9e8f1c6d2
Bug [#1971]. Fix line selection by clicking in the margin when scrolled.

diff -r d62863ae40a3 -r 96506cab38bd doc/ScintillaHistory.html
--- a/doc/ScintillaHistory.html	Mon Sep 11 09:05:35 2017 +1000
+++ b/doc/ScintillaHistory.html	Wed Sep 13 11:27:44 2017 +1000
@@ -554,6 +554,10 @@
 	The SQL lexer uses sql.backslash.escapes for double quoted strings.
 	<a href="http://sourceforge.net/p/scintilla/bugs/1968/">Bug #1968</a>.
 	</li>
+	<li>
+	On Cocoa, fix line selection by clicking in the margin when scrolled.
+	<a href="http://sourceforge.net/p/scintilla/bugs/1971">Bug #1971</a>.
+	</li>
     </ul>
     <h3>
        <a href="http://www.scintilla.org/scite400.zip">Release 4.0.0</a>
diff -r d62863ae40a3 -r 96506cab38bd src/Editor.cxx
--- a/src/Editor.cxx	Mon Sep 11 09:05:35 2017 +1000
+++ b/src/Editor.cxx	Wed Sep 13 11:27:44 2017 +1000
@@ -4320,6 +4320,8 @@
 		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;