do not return invisible gutter area for mouse events, do not include right gap into line numbers area

This commit is contained in:
Egor.Ushakov
2015-12-25 16:17:10 +03:00
parent 01a38fc69b
commit 82d41d0859
@@ -1218,19 +1218,19 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
@Nullable
public EditorMouseEventArea getEditorMouseAreaByOffset(int offset) {
if (offset < getAnnotationsAreaOffset()) {
if (isLineNumbersShown() && offset < getLineNumberAreaOffset() + getLineNumberAreaWidth()) {
return EditorMouseEventArea.LINE_NUMBERS_AREA;
}
if (offset < getAnnotationsAreaOffset() + getAnnotationsAreaWidth()) {
if (isAnnotationsShown() && offset < getAnnotationsAreaOffset() + getAnnotationsAreaWidth()) {
return EditorMouseEventArea.ANNOTATIONS_AREA;
}
if (offset < getFoldingAreaOffset()) {
if (isLineMarkersShown() && offset < getFoldingAreaOffset()) {
return EditorMouseEventArea.LINE_MARKERS_AREA;
}
if (offset < getFoldingAreaOffset() + getFoldingAreaWidth()) {
if (isFoldingOutlineShown() && offset < getFoldingAreaOffset() + getFoldingAreaWidth()) {
return EditorMouseEventArea.FOLDING_OUTLINE_AREA;
}