diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 74698a13d..1257ac4b0 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6051,20 +6051,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; } } @@ -8423,7 +8423,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.caretStyle; case SCI_SETCARETWIDTH: - if (wParam <= 0) + if (static_cast<int>(wParam) <= 0) vs.caretWidth = 0; else if (wParam >= 3) vs.caretWidth = 3; |