[platform UI][se] IJPL-249545 Ensure selected indexes are valid for the current model state

(cherry picked from commit 5f3f3f61cc2cb464d3e411eeb755183923ac5a34)

IJ-CR-213188

GitOrigin-RevId: 435d4c797e7205514b30389b64002086a8e54055
This commit is contained in:
Aydar Mukhametzyanov
2026-07-13 19:30:11 +00:00
committed by intellij-monorepo-bot
parent bce2b9ccf2
commit ae32153048
@@ -624,6 +624,8 @@ class SePopupContentPane(
@RequiresEdt
private suspend fun elementsSelected(indexes: IntArray, modifiers: Int) {
ThreadingAssertions.assertEventDispatchThread()
if (indexes.isEmpty() || indexes.max() >= resultListModel.size) return
var nonItemDataCount = 0
// Calculate items with indexes considering some non-item rows on top (for example, notification row).