Community
    • Login

    Double Ctrl+F won't bring the find dialog to the front of the primary window.

    Scheduled Pinned Locked Moved General Discussion
    17 Posts 5 Posters 5.6k 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.
    • Alan KilbornA
      Alan Kilborn
      last edited by

      My 2c is that centering isn’t that useful anyway.
      Why would you want this huge Find dialog obscuring a lot of your text in the main editing window.
      Blech!
      Position the Find window somewhere convenient, and leave it there.
      I like mine on a second monitor, obscuring none of the maximized N++ on the first monitor.
      Or, when I’m running single-monitor, I put it over the right-hand side of the Search results panel at the bottom.

      1 Reply Last reply Reply Quote 2
      • Ahu LeeA
        Ahu Lee
        last edited by

        @Alan-Kilborn ,

        I understand your reasoning and I partially agree, but I guess, it’s just a matter of habit (and probably a style). Some people are just better organized than others.

        As for the size of the dialog, I usually don’t leave it open for more than a couple of seconds. E.g., if I need to come up with some regular expression I do it elsewhere and then just paste it back to Npp.

        Thank you for the tips about the Find window positioning. It’s always good to know how other people work and do things.

        @PeterJones ,

        Yes, I was wrong. later I checked the older version and it’s true, if the Find dialog is already open you cannot change the tabs using the keyboard. The funny thing is that I hadn’t realized it before this discussion. Now the devs decision makes so much more sense to me, though I still believe they should have left the command accessible to users.

        Thank you for the request suggestion, especially for the ready-to-use phrase you so kindly provide. I’m sure this one won’t be confusing to other people :) I’ll gladly use it if I decide to make a request.

        Thanks, everybody. Thank you Peter for the great help!

        1 Reply Last reply Reply Quote 1
        • Ahu LeeA
          Ahu Lee
          last edited by

          If anyone’s interested in the old feature and also uses AutoHotkey, here’s a little script. Please let me know if there’s something that can be improved.

          #IfWinActive, ahk_class Notepad++
          $^f::
          #IfWinActive, ahk_class #32770
          $^f::
          
          if ctrlf_presses > 0
          {
              ctrlf_presses += 1
              return
          }
          
          ctrlf_presses = 1
          SetTimer, CtrlF, 400
          return
          
          CtrlF:
          SetTimer, CtrlF, off
          if ctrlf_presses = 1
          {
              Send, ^f
          }
          else if ctrlf_presses = 2
          {
              Send, ^f
          
              vWinCriteria := "Find ahk_class #32770"
              WinWaitActive, % vWinCriteria
          
              WinGetPos, X, Y, W, H, ahk_class Notepad++
              npX := X
              npY := Y
              npW := W
              npH := H
          
              WinGetPos, X, Y, W, H, ahk_class #32770
              fdW := W
              fdH := H
          
              left := npX + (npW - fdW)//2
              top := npY + (npH - fdH)//2
          
              WinMove, %left%, %top%
          }
          
          ctrlf_presses = 0
          return
          

          Double Ctrl+F centers the dialog window (similar to what the old feature did) and single Ctrl+F does just that – the single Ctrl+F only with a tiny delay which some people may not like, but that’s the price for having multiple actions bind to the same key. To me, it’s not a problem because I usually always press double Ctrl+F anyway.

          PeterJonesP 1 Reply Last reply Reply Quote 4
          • PeterJonesP
            PeterJones @Ahu Lee
            last edited by

            @Ahu-Lee ,

            I very much appreciate that, although you may have disagreed with the design decision, you are willing to admit that it makes a certain sense, and instead of railing against us (for being the bearers of bad news) or the developers (for not doing things in exactly the way you want), you instead found a workaround that works to your liking – and shared it with others, in case someone else might be able to benefit as well. I wish more visitors to this site took your approach.

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

              Not that I care, but what about “restoring” the old behavior if Ctrl+f is pressed when the Find window already has the Find tab active?

              1 Reply Last reply Reply Quote 2
              • Ahu LeeA
                Ahu Lee
                last edited by Ahu Lee

                I’m not sure I understood. Did you mean that, if the Find window itself is not active but its selected/active tab is “Find”? And in such a case make the old feature available?

                Also, what do you all think about the idea of making the old feature only available when the Find window is not active?

                That is, if the Find window is not active, everything works just like it used to be. But when the window is active, then double Ctrl+F is not distinguished from a single one (just like it works right now)?

                PeterJonesP 1 Reply Last reply Reply Quote 0
                • PeterJonesP
                  PeterJones @Ahu Lee
                  last edited by

                  @Ahu-Lee ,

                  “double Ctrl+F” carried no special meaning under the older revisions of Notepad++. It was two distinct Ctrl+F sequences that carried two different meanings, depending on context: the first Ctrl+F brought the Find dialog to the front, and once the dialog was in from, the next Ctrl+F it heard told it to re-center. It just didn’t require any extra delay between the two Ctrl+F’s, so in your mind, you stored it as double-Ctrl+F … but it was two distinct keystrokes in the logic of Notepad++.

                  The current v8.1.3-and-later behavior is that the first Ctrl+F brings the Find dialog to the forefront, and any subsequent Ctrl+F in that dialog activate the Find tab in that dialog.

                  Alan’s suggestion is that the first Ctrl+F should bring the Find dialog to the forefront, and any subsequent Ctrl+F in that dialog should “check if the Find tab is active; if not active, then activate the Find tab in the Find dialog; if it is already active, then re-center the dialog”.

                  Scott LivingstonS 1 Reply Last reply Reply Quote 4
                  • PeterJonesP PeterJones referenced this topic on
                  • Scott LivingstonS
                    Scott Livingston @PeterJones
                    last edited by

                    @peterjones That’s a good summation of the issue and a great solution. I’ll have to look into AutoHotkey that Ahu detailed above while I wait and hope for the triumphant return of the Re-Centering. I was only able to capture 3 of my 4 displays and since I have to blur contents other than the Notepad++ Find dialog it has an unfair advantage, but sometimes I really have to look to find it’s secret pop-up location! I put two red arrows in the image - the one on the left points up at Notepad++ and the one pointing down on the right points to the Find Dialog’s stealthy appearance. Add another monitor and a 14 hour day and it’s enough to send my pupils into an irrecoverable spin.

                    Though I really miss the old behavior, if <Ctrl-F> could at least open the dialog on the same monitor I think it would take away some of the sting out of the loss for those who used double-C+F. Sometimes it’s two monitors away.

                    Sorry I started a new thread and thanks to Ahu and other who have brought this up.

                    Notepad++HiddenFindDialog.jpg

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

                      @scott-livingston

                      sometimes I really have to look to find it’s secret pop-up location!

                      points to the Find Dialog’s stealthy appearance

                      I use 4 monitors as well most of the time, and I have no such problems. There are no secrets/stealth operations here – the Find dialog will remain where YOU last put it. There should be no need to go hunting for it, just don’t put it in a different location at different times – and if you do, remember where that was.

                      if <Ctrl-F> could at least open the dialog on the same monitor

                      Think of how many users that would not want that; I’m one of them. I’ll go out on a limb and say that most users of 2+ monitors have N++ full-screen on one of them, and a Find window appearing on that, right in the way of the text they are editing, would be terribly annoying as they now have to grab that Find window and move it somewhere else, to see their text behind it.

                      M 1 Reply Last reply Reply Quote 2
                      • PeterJonesP PeterJones referenced this topic on
                      • PeterJonesP PeterJones referenced this topic on
                      • PeterJonesP PeterJones referenced this topic on
                      • PeterJonesP PeterJones referenced this topic on
                      • M
                        Marshall-Brooks @Alan Kilborn
                        last edited by

                        Sorry for rehashing an old thread, but I didn’t see anywhere confirming that this was resolved.

                        @Alan-Kilborn said in Double Ctrl+F won't bring the find dialog to the front of the primary window.:

                        I use 4 monitors as well most of the time, and I have no such problems. There are no secrets/stealth operations here – the Find dialog will remain where YOU last put it. There should be no need to go hunting for it, just don’t put it in a different location at different times – and if you do, remember where that was.

                        The above is true if you use a static configuration. I can’t verify now, but where I typically see similar instances is where someone has dual monitors in the office and single monitors at home. So they move the window to monitor two and at home it still displays on monitor two, which doesn’t exist.

                        Also - somewhere along the way (8.81 or prior), Alan’s suggestion was implemented:

                        • First Ctrl-F (or Ctrl-H) brings up the find or replace dialog if closed or selects the Find or Replace tab if open.

                        • Second Ctrl-F selects the Find tab if not selected or centers the dialog if Find was already selected.

                        • Third Ctrl-F centers the dialog if not centered on the same monitor as NPP.

                        PeterJonesP 1 Reply Last reply Reply Quote 0
                        • PeterJonesP
                          PeterJones @Marshall-Brooks
                          last edited by

                          @Marshall-Brooks said in Double Ctrl+F won't bring the find dialog to the front of the primary window.:

                          Also - somewhere along the way (8.81 or prior), Alan’s suggestion was implemented:

                          v8.3.3 in March 2022, so a few months after Alan’s 2021 post. See https://github.com/notepad-plus-plus/notepad-plus-plus/wiki/Changes#833

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