Community
    • Login

    Show search result on top or bottom of current view

    Scheduled Pinned Locked Moved General Discussion
    feature requestfindsearch results
    4 Posts 2 Posters 1.7k Views 1 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.
    • Thomas__T Offline
      Thomas__
      last edited by Thomas__

      Hi,

      I would like to have an option in “Find” window (or general setting) where I can specify if a search result is shown in the middle (this is currently standard as it looks like) or on top or on bottom of the current view.

      Reason:
      Sometimes the content below a search result is important,
      sometime the content above a search is important
      and sometimes the middle is perfect.

      Very very nice would be if in “Find” window I could specify the numbers of lines above and below a test result are shown (and all others disappear).
      ;-)

      Thank you in advance!
      And thank for this GREAT software!!!

      Best regards
      Thomas

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

        @Thomas-Weiß

        So…that sounds like a feature request, and that’s fine, except no one that matters to the process of handling that feature request will see it here. The proper place for a feature request is found by following the instructions HERE.

        That being said, it is possible your feature request will not be acted upon. :-(

        But…something could be scripted such that when you hit a keycombo, the line of the caret is “jumped” to the top/bottom of the current viewport – would that be valuable?

        I’m thinking something like what was presented HERE.

        Thomas__T 1 Reply Last reply Reply Quote 2
        • Thomas__T Offline
          Thomas__ @Alan Kilborn
          last edited by

          @Alan-Kilborn

          Thank you very much for that hint.
          I have placed the feature request here.
          https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9629

          Feel free to support it!
          ;-)

          Best regards
          Thomas

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

            So I ended up scripting a little mock up demo of this, which I won’t post unless there’s interest, but really there’s only a couple of new things that need to happen after a search match to make this work:

            • find the number of lines shown on screen

            • set the first visible line to a correct value (based upon the starting line of a find match, and the number of lines shown on screen, and of course the desired effect specified by the OP)

            • hmm, maybe it gets a tad more complicated if text between the match and the top of screen has folded/hidden lines…

            However, looking at how N++ moves the display/selection when a match is found, there seems to be a lot going on with the logic, so I’m not sure how well any changes would fit in.

            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