Community
    • Login

    Using Find All results

    Scheduled Pinned Locked Moved General Discussion
    15 Posts 7 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mkupperM
      mkupper @Larry Schwartz
      last edited by

      @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.

      1 Reply Last reply Reply Quote 1
      • Michael VincentM
        Michael Vincent @PeterJones
        last edited by

        @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.

        Larry SchwartzL TBugReporterT 2 Replies Last reply Reply Quote 3
        • Larry SchwartzL
          Larry Schwartz @Michael Vincent
          last edited by

          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.

          mkupperM 1 Reply Last reply Reply Quote 0
          • Larry SchwartzL
            Larry Schwartz
            last edited by

            I did not change anything after clicking Find All. I tried again with the search argument PDF. Same type of results.

            Alan KilbornA 1 Reply Last reply Reply Quote 0
            • Alan KilbornA
              Alan Kilborn @Larry Schwartz
              last edited by Alan Kilborn

              @Larry-Schwartz

              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

              1 Reply Last reply Reply Quote 2
              • Larry SchwartzL
                Larry Schwartz @Larry Schwartz
                last edited by Larry Schwartz

                @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”?

                Alan KilbornA 1 Reply Last reply Reply Quote 0
                • TBugReporterT
                  TBugReporter @Michael Vincent
                  last edited by TBugReporter

                  @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.)

                  1 Reply Last reply Reply Quote 1
                  • Alan KilbornA
                    Alan Kilborn @Larry Schwartz
                    last edited by

                    @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 that new 1 was the name of the file in someone else’s screenshot, not yours.
                    What is the filename/path in your case?

                    1 Reply Last reply Reply Quote 1
                    • mkupperM
                      mkupper @Larry Schwartz
                      last edited by

                      @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.

                      1 Reply Last reply Reply Quote 1
                      • Alan KilbornA
                        Alan Kilborn
                        last edited by

                        I think it is my day for missing things, as I missed TWO pieces of data that the OP already provided. My bad. :(

                        Larry SchwartzL 1 Reply Last reply Reply Quote 0
                        • Larry SchwartzL
                          Larry Schwartz @Alan Kilborn
                          last edited by

                          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.

                          Terry RT PeterJonesP 2 Replies Last reply Reply Quote 0
                          • Terry RT
                            Terry R @Larry Schwartz
                            last edited by

                            @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?

                            aff983b0-632f-4101-a168-5bd74954c992-clicking.JPG

                            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

                            1 Reply Last reply Reply Quote 0
                            • PeterJonesP
                              PeterJones @Larry Schwartz
                              last edited by PeterJones

                              @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:
                              e2ea2811-edd8-4dc4-857b-342f8ce45cf3-image.png

                              • 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:
                              0f7e4e70-26e6-4194-8bb8-b4f34db50aed-image.png

                              Please note that by default, Smart Highlight only works on complete words… so if you had searched for ntr from the entry, or done a regular expression search [nt] tv (which matches n tv from verizon tv and t tv from comcast 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)
                              b120d613-1932-4fce-b8df-e0fc8daf0e7f-image.png

                              —

                              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
                              1 Reply Last reply Reply Quote 2
                              • First post
                                Last post
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors