Open lutz-leonhardt opened 2 years ago
Is there another way to cycle between the highlights?
cycle between highlighted words with F3
, I guess what you mean is Find Next / Move to Next Occurrence, right?
yes, exactly
In usual, when some find actions (like Ctrl+F Find...
and Ctrl+Shift+F7 Highlight Usages in File
) perform, HighlightHandlerBase#setupFindModel
will be called. At this time, A FindModel will set in FindManager, seeFindManager#setFindNextModel
.
Find Next / Move to Next Occurrence triggers SearchAgainAction
, and tells FindManager#findNextUsageInEditor
to find the next usage. In this process, all highlighters managed by HighlightManager
will be compared with the current caret location to find out the nearest one.
But highlighters created by MultiHighlight don't save in HighlightManager
in v3.0.0, so Find Next / Move to Next Occurrence
doesn't work.
See also:
com.intellij.codeInsight.highlighting.HighlightHandlerBase#setupFindModel
com.intellij.find.FindManager#setFindNextModel
com.intellij.ide.actions.SearchAgainAction
com.intellij.find.FindManager#findNextUsageInEditor
com.intellij.codeInsight.highlighting.HighlightManagerImpl#getHighlighters
There are 2 ways to solve:
HighlightManager
, so that FindManager
could find them.See also:
com.intellij.codeInsight.highlighting.HighlightManager#addOccurrenceHighlight
com.intellij.find.impl.FindManagerImpl#findNextUsageInFile
The current version does not cycle between highlighted words with F3. IMO this was the case in earlier versions. It would be nice to make this possible again.