It has more to do with the current status of that flight's waypoint and not so much the proximity. For example, if both enemy and friendly flights are "in transit" or "going home", they will not attack. Only commands like "searchintercept" or "on patrol" will initiate an attack. This was discussed to death a long time ago. Even Pol had done an experimental modification which never made it to the game where he allowed random actions like switching from "going home" to "attack" WITHOUT any provocation such as getting hit by bullets.