mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
This is a bit complicated and confusing. We have a flag to fit the popup into the screen. However, the existing code ignored that flag and fit it anyway, but only if the popup is too large. If it's small enough, then it was left alone regardless of whether it's actually located fully within the screen. The previous fix ignored that flag as well, but fit the popup into the screen in all cases. Which meant the flag was now useless. So to keep it working for both cases, let's actually check that flag here. If it's set, then use the new logic: fit into the screen no matter what. Otherwise, only fit it into the screen if it's too large, keeping the old logic there. That logic was introduced for Search Everywhere to begin with, and it has the flag set to false. So we're not changing anything there. And at the same time it'll fix issues with popups such as the Commit Options. (cherry picked from commit 92d1f0be81d4860901414d3266ec4de3af2fc952) IJ-CR-149457 GitOrigin-RevId: 4539693a61b8b7b8920795868e0146f53ffdd0ec