New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notepad++ fails to jump to search hits initiated by "Find All in" (Current Document/All Opened Documents) searches for the first, new, unsaved document under certain conditions. #13636
Comments
Here's some STR for this, that I couldn't quite come up with myself in another issue. |
Yes, I remembered #13608 (comment). |
Can confirm. Also wanted to elaborate that changing the display name of the first unsaved document will make it so that that document is no longer missed.
|
That's a nice workaround--thanks! |
I've just seen that. Interesting. |
I also confirm the bug since version 8.5. I use these simplified steps to reproduce: Steps to Reproduce the Issue
|
Sadly, this issue hasn't gotten much traction, although it is easy to reproduce and clearly a problem. :-( An obvious and easy workaround is to NOT do this type of searching in a |
I'm going to look over these commits to see what might have caused this bug. If others want to do the same, that would help. |
From the tone of that comment, it seems like you feel this is a "tough one". :-( |
@molsonkiko Didn't look into it more, but I guess it won't consider the new document correctly due to the number already being used or something. |
Yep, good catch! It seems like there's some relevant discussion in #8677, which is one of the issues closed by that commit. An executive summary of the conversation:
I think it would be a bad idea to try changing how that commit worked, because it would likely cause all sorts of problems completely unrelated to the very simple problem we are trying to solve here. AFAIK none of these other forms cause issues with the search results form. I think the problem is that, when you click on the search results form, the currently active buffer is |
Inspired by jofon's analysis and my investigation of the related issues, I discovered that the To duplicate:
|
Description of the Issue
Notepad++ fails to jump to search hits initiated by "Find All in" (Current Document/All Opened Documents) searches for the first, new, unsaved document under certain conditions.
The two conditions:
After these two condtions are met:
Steps to Reproduce the Issue
The Search results window will show a listing of 5 hits (1 file).
The Search results window will show a listing of 10 hits (2 files).
Addendum:
If you repeat steps 7 and 8 several times for further new documents ("new 2", "new 3", "new 4") then proceed with steps 9 through 11. The behavior of jumping to the correct location works for all of the documents except for the first, new, unsaved document created after our opened document ("new 1" in our example).
Expected Behavior
Double-clicking any of the hits from the Search results window will result in NP++ jumping to the correct doucment and line of the search hit.
Actual Behavior
Double-clicking any of the hits from the Search results window will result in NP++ jumping to the correct doucment and line of the search hit with the exception of the first, new, unsaved document created after opening a saved document.
Debug Information
Notepad++ v8.5.2 (64-bit)
Build time : Apr 4 2023 - 19:55:32
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 7 Professional (64-bit)
OS Build : 7601.0
Current ANSI codepage : 1252
UPDATE: This bug seems to have been introduced in Notepad++ v8.5 as the last verison to exhibit expected behavior was in Notepad++ v8.4.9.
The text was updated successfully, but these errors were encountered: