aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-01-16 09:48:30 +1100
committerNeil <nyamatongwe@gmail.com>2015-01-16 09:48:30 +1100
commit59a2c47ed03ac40ec5a612cb74667dc70900dff5 (patch)
treed7852fd450d8e3b7d9a15b7a31056c04393459d1
parent61b4fe924b11fecf2e14c337a06376860a85173d (diff)
downloadscintilla-mirror-59a2c47ed03ac40ec5a612cb74667dc70900dff5.tar.gz
When the mouse is on the line between margin and text changed to treat as withinrel-3-5-3
text. Helps on PLAT_CURSES.
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--include/Platform.h5
-rw-r--r--src/Editor.cxx2
3 files changed, 10 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 35847dcf6..5fb8eb4b1 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -526,6 +526,10 @@
<a href="http://sourceforge.net/p/scintilla/bugs/1575/">Bug #1575</a>.
</li>
<li>
+ When the mouse is on the line between margin and text changed to treat as within text.
+ This makes the PLAT_CURSES character cell platform work better.
+ </li>
+ <li>
Fix a crash in SciTE when the command line is just "-close:".
<a href="http://sourceforge.net/p/scintilla/bugs/1675/">Bug #1675</a>.
</li>
diff --git a/include/Platform.h b/include/Platform.h
index 4bba252f2..c4a1a0b40 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -144,6 +144,11 @@ public:
return (pt.x >= left) && (pt.x <= right) &&
(pt.y >= top) && (pt.y <= bottom);
}
+ bool ContainsWholePixel(Point pt) const {
+ // Does the rectangle contain all of the pixel to left/below the point
+ return (pt.x >= left) && ((pt.x+1) <= right) &&
+ (pt.y >= top) && ((pt.y+1) <= bottom);
+ }
bool Contains(PRectangle rc) const {
return (rc.left >= left) && (rc.right <= right) &&
(rc.top >= top) && (rc.bottom <= bottom);
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 4902dbdc8..8cf77ead1 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4008,7 +4008,7 @@ 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);
- return rcSelMargin.Contains(pt);
+ return rcSelMargin.ContainsWholePixel(pt);
} else {
return false;
}