Community
    • Login

    Invoke find/replace with selection - selection box not marked

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    12 Posts 5 Posters 1.5k 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.
    • appyfaceA
      appyface
      last edited by

      @Terry-R Thanks for that link. I think that is different issue, if I reading it right?

      I too have seen the ‘in selection’ box greyed out/can’t mark it of late. And I also haven’t been able to pin down the stituation when that happens. But that does happen a lot for me.

      What I’m asking about is something else. I thought NPP had behaved in past like my other text editor does: Highlight some text in the document, then press CTRL-F. The ‘in selection’ box is marked automatically because text in the document was highlighted first before invoking CTRL-F. And if no text is selected in the document (cursor is between letters so to speak) and press CTRL-F, then the ‘in selection’ box is clear.

      Again, maybe I’m just daft and thought NPP used to behave this way. It definitely doesn’t now and I can’t find any option to switch it on.

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

        @appyface

        Here’s how it works: If you have over a certain amount of text selected (I believe it is a thousand or maybe 1024) characters, THEN In selection will automatically be ticked when you invoke a Find / Replace.

        appyfaceA 1 Reply Last reply Reply Quote 2
        • appyfaceA
          appyface @Alan Kilborn
          last edited by

          @Alan-Kilborn Thanks for info. I will check this and get back.

          1 Reply Last reply Reply Quote 0
          • appyfaceA
            appyface
            last edited by

            Here’s what’s happening for me - 64-bit portable 7.9.3 version.

            1. Invoke CTRL-F with 1025 characters selected and the ‘in selection’ box is automatically marked. (Characters include line delimiters, special characters, etc.) Less than that and ‘in selection’ is not automatically marked.

            2. Once ‘in selection’ is marked, it remains marked for all character selections with CTRL-F regardless of selection length - until CTRL-F is invovked with no characters selected, then ‘in selection’ is automatically cleared. A 1025 character selection is required before ‘in selection’ will be marked automatically again.

            If ‘in selection’ is manually marked, it behaves as in #2 above. If ‘in selection’ is manually unmarked, it behaves as in #1.

            @Alan-Kilborn Thanks for putting me onto the right direction to find out what is happening.

            I’d love to have a simple preference setting that if any text is highlighted, mark the box, if none, unmark the box. But now that I know how it works today, it’s certainly not a deal breaker. Thanks for help and info.

            Sandro TanganelliS 1 Reply Last reply Reply Quote 1
            • Sandro TanganelliS
              Sandro Tanganelli @appyface
              last edited by

              @appyface I am using NPP 8.3.3 and the “in selection” behavior is still erratic and problematic. For instance it doesn’t work at all if you’re using a rectangular selection. Not even if the rectangular selection extends for more than 1025 rows. It’s a bad bug because competing editors like TextPlus don’t have this problem and because for work I need to edit large amounts of formatted data and I don’t want to mess with regular expressions for my replacements.

              Lycan ThropeL Alan KilbornA 2 Replies Last reply Reply Quote -1
              • Lycan ThropeL
                Lycan Thrope @Sandro Tanganelli
                last edited by

                @sandro-tanganelli ,
                Then use TextPlus so you don’t have to mess with the regular expressions. Wow…what a concept, using the tool you need. Besides, you just answered a year old post just to be snide about something that you claim you don’t want to use anyway. Cya.

                Sandro TanganelliS 1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn @Sandro Tanganelli
                  last edited by

                  @sandro-tanganelli said in Invoke find/replace with selection - selection box not marked:

                  it doesn’t work at all if you’re using a rectangular selection.

                  It never has. I think I remember something about someone wanting to contribute a change to the software to make it do so, but the Notepad++ author was of the opinion that “too much code would have to change” to make it worth it (I suppose meaning it was too risky for breaking existing behavior).

                  Sandro TanganelliS 1 Reply Last reply Reply Quote 1
                  • Sandro TanganelliS
                    Sandro Tanganelli @Lycan Thrope
                    last edited by

                    @lycan-thrope necro-posting may stink but the issue has not been further discussed and no solution was implemented.

                    Also, I’d rather not install one more text editor when NPP can easily fix its bug.

                    As much as I hate all the little incongruences of NPP it’s a better tool than TextPad or UltraEdit for what I need to do.

                    1 Reply Last reply Reply Quote 0
                    • Sandro TanganelliS
                      Sandro Tanganelli @Alan Kilborn
                      last edited by

                      @alan-kilborn said in Invoke find/replace with selection - selection box not marked:

                      It never has. I think I remember something about someone wanting to contribute a change to the software to make it do so, but the Notepad++ author was of the opinion that “too much code would have to change” to make it worth it (I suppose meaning it was too risky for breaking existing behavior).

                      As long as you know your rectangular selection may not be rectangular after the edit…

                      After all, I don’t know other user’s experiences but when you work with regular expressions it seems a costant that you don’t get what you want the first five or six trials.

                      Nothing really new, except you’d not get what you want… quicker. :-)

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

                        FWIW, and I don’t know why I didn’t mention this earlier, I wrote a PythonScript to handle this, and it is HERE.

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors