Community
    • Login

    Find previous doesn't work

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 1.7k Views 2 Watching
    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.
    • Steven123S Offline
      Steven123
      last edited by

      I have a strange issue where “Find Previous” doesn’t work. Nothing happens when pressing the keyboard shortcut F4 or using the menu (Search > Find Previous). “Find Next” works just fine. Any ideas how to fix this?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @Steven123
        last edited by

        @Steven123 ,

        If you are in Search Mode = Regular Expression, then find-previous does not work … by default. This is because regex don’t work as you expect them to in reverse direction.

        If you would like to enable regular expression reverse search, you will have to edit a configuration file manually, as described at npp-user-manual.org

        If this does not match your problem, you will have to describe things more fully (a screenshot of your Find dialog would go a long way toward that).

        1 Reply Last reply Reply Quote 2
        • Steven123S Offline
          Steven123
          last edited by

          @PeterJones thanks, Search Mode = Regular Expression was the issue. Do you have an example of a regex that doesn’t behave as expected when searching in reverse? I have done it many times in other editors such as Vim and Sublime Text without encountering any issues.

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

            @Steven123 said in Find previous doesn't work:

            Do you have an example of a regex that doesn’t behave as expected when searching in reverse?

            I did some research and it appears the logic for disabling the feature was that certain regex do not produce the same matches when moving forward through a series of different matches as is produced when moving backward through the same text.

            It was deemed desirable from a user perspective to produce the same hits moving in either direction (otherwise users would put in bugs about this).

            The example cited was this one:

            find: t\w+

            on this text: to the test they travelled

            which, if you try an older version of Notepad++ where backward searches were allowed, it does indeed produces different results.

            1 Reply Last reply Reply Quote 2

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors