-
Notifications
You must be signed in to change notification settings - Fork 231
Description
Let's make sure issue is not already fixed in latest builds first.
- I looked at the source code of the master branch (FileSearchPage.java) and the code seams to be identical to the code in my Eclipse 4.35 installation.
Steps to reproduce
Create a text file with the following 3 lines:
ABC
ABCBC
ABCDCDC
Then do a file search on the file and search for "A". The label of the search view says "3 matches in ..." OK
Then repeat the search and search for "B". The label of the search view says "4 matches in ... (showing 3 of 4 matches)" which is NOT OK because all matches are shown.
If you search for "C" the label will be "6 matches in ... (showing 3 of 6 matches)" which is also NOT OK.
Since all matches are shown in the search view the view should not report not shown matches.
Locking at the source code of the label generation in FileSearchPage.getLabel() the problem seams to be an incorrect comparison of lines (leaves in the tree) and matches in the first if branch that generates this label extension.
Tested under this environment:
- OS & version: Windows 11
- Eclipse IDE/Platform version (as shown in Help > About): 4.35
Community
- I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.