Using Find All results
-
@Larry-Schwartz I also successfully replicated @PeterJones results though saw one thing when trying to break the finder.
I did the find-all using the same text that PeterJones used. I then replaced the string “Comcast” with the letter “x” and then started double clicking on the find-all results for Comcast. I discovered that although find-all displays line numbers that internally it’s using file’s byte or character offset and the match size’s character count of the original match to set up the selection when jumping to a find result.
A similar test is to do the find-all and then to add a new line 1 in the file line with zzzzzzzz…zzzzzzzzzzzzz. Double clicking on the find-all results will jump to line 1 and select the 7-character section of that line that matches where that instance of “Comcast” was at the time the find-all was run.
That makes me wonder if Larry-Schwartz did the find-all, edited or modified his text file, and then expected the find-all results to track where the words “Comcast” were in the edited file. That would give the impression of “not working” to some people.
-
@PeterJones said in Using Find All results:
It works for me.
Works for me too (unfortunately) as Comcast is the only option to click. I do not have Verizon in my area and thus am stuck with the anti-competitive, exorbitant, internet-only over-pricing for asymmetrical up/down while all communities around me enjoy gigabit FIOS.
/sarcasm
Cheers.
-
The Find box contains:
C:\Users\Owner\OneDrive\Desktop\Scratchpad\Scratch Pad 07-24.txt (1 hit)
Line 1225: I recommend sticking with Comcast, but …The file name line is green. The result line is black on white except that the line number and the word Comcast are red/orange.
-
I did not change anything after clicking Find All. I tried again with the search argument PDF. Same type of results.
-
What version of Notepad++ are you using?
Up until very recently, searching this way in the
new 1
file did not work correctly.See point number 5 here: https://community.notepad-plus-plus.org/topic/24825/notepad-v8-5-6-release
-
@Larry-Schwartz said in Using Find All results:
N++ V8.5.6 under Windows 11 on a PC. 64 bit version. I looked at the release note but the problem still exists for me. What is the “new 1”?
-
@Michael-Vincent said in Using Find All results:
Comcast is the only option […] I do not have Verizon in my area […]
You mean TweedleDumb and TweedleDumber? 🤨 (I’ve had both, and can’t decide which is worse - Vz might be faster when it works, but I think they deliberately withhold technical info from their service people, to force them to call in and get their sales department involved in everything.)
-
@Larry-Schwartz said in Using Find All results:
I looked at the release note but the problem still exists for me. What is the “new 1”?
Interesting.
Ah, OK, I see thatnew 1
was the name of the file in someone else’s screenshot, not yours.
What is the filename/path in your case? -
@Larry-Schwartz said in Using Find All results:
C:\Users\Owner\OneDrive\Desktop\Scratchpad\Scratch Pad 07-24.txt
That may be a clue. You seem to be using OneDrive.
OneDrive tries to keep local copies of files consistent with the copies on the remote OneDrive servers. That process has created issues for Notepad++ in the past though from what I recall, it was spurious “file modified, do you want to reload it?” notifications. It’s possible OneDrive causes unexpected results for Find-All.
I have OneDrive disabled on my machine and so don’t have a way to try to replicate your issue. Hopefully someone else on the forums uses OneDrive and can do the Comcast/Verizon test.
-
I think it is my day for missing things, as I missed TWO pieces of data that the OP already provided. My bad. :(
-
To avoid the OneDrive (paraphrasing Abou Ben Adhem, may it never rest in peace) possible problem, I created a new file in NP++:
entry 1 verizon tv
entry 2 comcast tv
entry 3 no ISP
Find All “tv” returned lines 1 and 2. Clicking on result’s 1 and 2 in the resultant “Line 1” or “Line 2” highlighted the string TV in BOTH lines in the file. Clicking on the word LINE or the 1 or 2, before and after highlighting them, produced no result.
Thanks to all for their interest in my little problem. I’m working with a 5000+ line file so getting this working can be a big help. -
@Larry-Schwartz said in Using Find All results:
Find All “tv” returned lines 1 and 2. Clicking on result’s 1 and 2 in the resultant “Line 1” or “Line 2” highlighted the string TV in BOTH lines in the file. Clicking on the word LINE or the 1 or 2, before and after highlighting them, produced no result.
I’ve read this thread trying to understand the issue.
However this last post with the wording I’ve included above seems to indicate double clicking on different portions of the “search result” line either results in the cursor moving to the selected line, OR NOT depending on which area. See the image below, is this what you mean?
If so, that’s very peculiar. In my test, double clicking on ANY portion of a search result line will move the cursor to the correct line in the file.
Terry
-
@Larry-Schwartz said in Using Find All results:
licking on result’s 1 and 2 in the resultant “Line 1” or “Line 2” highlighted the string TV in BOTH lines in the file.
Ah, you are confusing the search’s selection and active line with the “smart highlighting” feature of Notepad++.
Go into the editor; double-click on
tv
. If you are using default colors, you will see 3 colors involved:
- Line 1 has the “Current Line Background” (the bluish-gray)
- Line 1’s
tv
is highlighted with both the “Selected Text Colour” background (darker gray) and the “Smart Highlighting” (bright green) background, which combine to make a darker greeen background - Line 2’s
tv
is highlighted with just the “Smart Highlighting” (bright green) background
When you use Find All’s Search Results window, double-clicking on the result line will (1) set that line active (give it “Current Line Background”) and 2) select the match (
tv
) with the active editor selection (“Selected Text Colour”), and 3) if you have Smart Highlighting enabled (it is by default; see Settings > Preferences > Highlighting > Smart Highlighting)It is both selecting the active match and doing the Smart Highlighting. If you don’t like Smart Highlighting, turn it off – if you do, then it will look more like this new screenshot, and will no longer have the green Smart Highlighting, so you can better tell which match is being selected:
Please note that by default, Smart Highlight only works on complete words… so if you had searched for
ntr
from theentry
, or done a regular expression search[nt] tv
(which matchesn tv
fromverizon tv
andt tv
fromcomcast tv
), then it would not have shown the Smart Highlighting (unless you, like I, un-checked the ☐ Match whole word only setting, in which case it would show smart highlighting for just the ones that are exact matches with the active selection, regardless of whether the regular expression would have selected more)
—
References
- User Manual: Style Configurator > Global Styles: describes the “Current Line Background”, “Selected Text Colour”, and “Smart Highlighting” style definitions
- User Manual: Settings > Preferences > Highlighting: describes Smart Highlighting