[lvcs] install shortcuts for the next or previous actions only for content search

These actions navigate through matches in the diff panel and are useless for the filter by file.

follow-up: 2ce96bcb97736957bfb90a2e70ca05fada3f3d02

GitOrigin-RevId: cdb58b7ba8f07a5759ffadd7177705c61de65ee7
This commit is contained in:
Julia Beliaeva
2024-05-21 16:35:47 +02:00
committed by intellij-monorepo-bot
parent 8f595865ad
commit a5b1cbfb22

View File

@@ -213,12 +213,14 @@ class ActivityView(private val project: Project, gateway: IdeaGateway, val activ
val searchTextArea = SearchTextArea(textArea, true)
searchTextArea.setBorder(JBUI.Borders.compound(IdeBorderFactory.createBorder(SideBorder.RIGHT), searchTextArea.border))
dumbAwareAction { selectNextOccurence(true) }.registerCustomShortcutSet(Utils.shortcutSetOf(
Utils.shortcutsOf(IdeActions.ACTION_FIND_NEXT) + Utils.shortcutsOf(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN)
), searchTextArea)
dumbAwareAction { selectNextOccurence(false) }.registerCustomShortcutSet(Utils.shortcutSetOf(
Utils.shortcutsOf(IdeActions.ACTION_FIND_PREVIOUS) + Utils.shortcutsOf(IdeActions.ACTION_EDITOR_MOVE_CARET_UP)
), searchTextArea)
if (model.filterKind == FilterKind.CONTENT) {
dumbAwareAction { selectNextOccurence(true) }.registerCustomShortcutSet(Utils.shortcutSetOf(
Utils.shortcutsOf(IdeActions.ACTION_FIND_NEXT) + Utils.shortcutsOf(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN)
), searchTextArea)
dumbAwareAction { selectNextOccurence(false) }.registerCustomShortcutSet(Utils.shortcutSetOf(
Utils.shortcutsOf(IdeActions.ACTION_FIND_PREVIOUS) + Utils.shortcutsOf(IdeActions.ACTION_EDITOR_MOVE_CARET_UP)
), searchTextArea)
}
dumbAwareAction {
IdeFocusManager.getInstance(project).requestFocus(searchTextArea.textArea, true)
}.registerCustomShortcutSet(Utils.shortcutSetOf(Utils.shortcutsOf(IdeActions.ACTION_FIND)), activityList)