diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java index 4a693d313f25..fb2f5a32ae26 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java @@ -5333,15 +5333,14 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi */ private boolean tweakSelectionEvent(@NotNull MouseEvent e) { return getSelectionModel().hasSelection() && e.getButton() == MouseEvent.BUTTON1 && e.isShiftDown() - && e.getComponent() == getGutterComponentEx(); + && getMouseEventArea(e) == EditorMouseEventArea.LINE_NUMBERS_AREA; } /** * Checks if editor selection should be changed because of click at the given point at gutter and proceeds if necessary. *

- * The main idea is that selection can be changed during left mouse clicks with hold Shift button and we want - * to distinguish that situation from 'close line numbers gutter' action (activated by 'Shift+click' - * on gutter area). + * The main idea is that selection can be changed during left mouse clicks on the gutter line numbers area with hold + * Shift button. The selection should be adjusted if necessary. * * @param e event for mouse click on gutter area * @return true if editor's selection is changed because of the click; false otherwise