diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2017-09-13 11:27:44 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2017-09-13 11:27:44 +1000 |
commit | f2b69582ad2e82c506294ae7644be0bf5da88763 (patch) | |
tree | f818a0f2b70d7d81a6b10368257c6a52adf3e3b4 | |
parent | 313a81f7f8419b3c1ac6ac57ea7719c7b8aa28cf (diff) | |
download | scintilla-mirror-f2b69582ad2e82c506294ae7644be0bf5da88763.tar.gz |
Bug [#1971]. Fix line selection by clicking in the margin when scrolled.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | src/Editor.cxx | 2 |
2 files changed, 6 insertions, 0 deletions
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. <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 --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<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; |