aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-08-10 19:53:34 +1000
committernyamatongwe <devnull@localhost>2011-08-10 19:53:34 +1000
commitc5e6a869158ea5357780e809f36fa555783e9a45 (patch)
tree993f9f7aef8be7da651b38ba1fff39a08f0d6bd9 /src
parentfa13e9dbdbaf92a5e68e3669ed71cc830c759aa0 (diff)
downloadscintilla-mirror-c5e6a869158ea5357780e809f36fa555783e9a45.tar.gz
Fix for wrong cursor near selection ends when scrolled horizontally. Bug #3389055.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 452666be7..f6b1ea308 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -6020,20 +6020,20 @@ bool Editor::PositionInSelection(int pos) {
bool Editor::PointInSelection(Point pt) {
SelectionPosition pos = SPositionFromLocation(pt, false, true);
- int xPos = XFromPosition(pos);
+ Point ptPos = LocationFromPosition(pos);
for (size_t r=0; r<sel.Count(); r++) {
SelectionRange range = sel.Range(r);
if (range.Contains(pos)) {
bool hit = true;
if (pos == range.Start()) {
// see if just before selection
- if (pt.x < xPos) {
+ if (pt.x < ptPos.x) {
hit = false;
}
}
if (pos == range.End()) {
// see if just after selection
- if (pt.x > xPos) {
+ if (pt.x > ptPos.x) {
hit = false;
}
}