notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
[BUG] Count (or FindNext) works, but FindAllinCurrDoc doesn't
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Is there an existing issue for this?
- I have searched the existing issues
Description of the Issue
Please see STR (Steps to Reproduce), below.
Steps To Reproduce
- Create a new tab and add this text:
abc\r\n
123
def\r\n
456
abc\r\n
123
def\r\n
456
- Select lines 1 through 2 fully by clicking on the
1in the line number margin and dragging downward to the2; result:
- Press Ctrl+f to invoke the Find window (Find what gets auto-populated with selected text)
- Setup the other find options as shown here:
- Press Count; observe 2 occurrences counted (good)
- Without changing anything else, press Find All in Current Document
Current Behavior
Zero occurrences found:
Expected Behavior
2 occurrences (obviously)
Debug Information
Notepad++ v8.7 (64-bit)
Build time : Sep 17 2024 - 17:06:31
Path : C:\NotepadPlusPlus\Misc\_NoBackup\Releases\npp.8.7\npp.8.7.portable.x64\notepad++.exe
Command Line : -titleAdd="8.7 64-bit" -multiInst
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 11 Pro (64-bit)
OS Version : 23H2
OS Build : 22631.4317
Current ANSI codepage : 1252
Plugins :
mimeTools (3.1)
NppConverter (4.6)
NppExport (0.4)
PythonScript (2)
Anything else?
The STR were shown using the Count function, but correct searching behavior can be shown with Find Next instead by substituting this new step 5 for the step 5 in STR:
- Press Find Next repeatedly; observe that Notepad++ will find the data at lines 7 through 8, then 1 through 2, then 7 through 8, etc. (good)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in Notepad++ using the Find window, selecting lines 1–2 and comparing Count with Find All in Current Document; Find Next provides a second comparison. Trace the Find window entry points for these commands and verify that Find All reports the same two occurrences as Count and Find Next.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100