int (@NotNull Editor editor, int y) { int visualLineBaseY = editor.visualLineToY(editor.yToVisualLine(y)); return y > visualLineBaseY && y < visualLineBaseY + editor.getLineHeight() ? visualLineBaseY : y; }