diff options
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index a6b699298..2da4a2c9c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -486,7 +486,7 @@ SelectionPosition Editor::SPositionFromLocation(Point pt, bool canReturnInvalid,  	pt.x = pt.x - vs.fixedColumnWidth + xOffset;  	int visibleLine = pt.y / vs.lineHeight + topLine;  	if (pt.y < 0) {	// Division rounds towards 0 -		visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine; +		visibleLine = (static_cast<int>(pt.y) - (vs.lineHeight - 1)) / vs.lineHeight + topLine;  	}  	if (!canReturnInvalid && (visibleLine < 0))  		visibleLine = 0; | 
