Community
    • Login

    BUG: Replace "In selection" greyed out

    Scheduled Pinned Locked Moved General Discussion
    7 Posts 6 Posters 3.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.
    • Petar LazovićP
      Petar Lazović
      last edited by

      Steps to reproduce:
      Put cursor in line which doesn’t contain text, press CTRL+H, “In Selection” check box is greyed out (you may need to repeat this until check box is greyed out).
      Select text, press CTRL+H, “In Selection” check box is still greyed out. Change to “Find” tab in dialog window, change back to “Replace” tab, “In Selection” check box isn’t greyed out anymore.

      If this isn’t the place to report bug, please move this message to appropriate section.

      Regards,
      Petar

      Debug info:
      Notepad++ v7.9.1 (64-bit)
      Build time : Nov 2 2020 - 01:07:46
      Path : C:\Program Files\Notepad++\notepad++.exe
      Admin mode : OFF
      Local Conf mode : OFF
      OS Name : Windows 10 Pro (64-bit)
      OS Version : 1903
      OS Build : 18362.1256
      Current ANSI codepage : 1250
      Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll XMLTools.dll

      Alan KilbornA astrosofistaA 2 Replies Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @Petar Lazović
        last edited by Alan Kilborn

        @Petar-Lazović

        Put cursor in line which doesn’t contain text, press CTRL+H, “In Selection” check box is greyed out

        Yes (caret on line 26 when Ctrl+h pressed):

        Imgur

        Select text, press CTRL+H, “In Selection” check box is still greyed out.

        No, not for me:

        Imgur

        with:

        Notepad++ v7.9.1 (64-bit)
        Build time : Nov 2 2020 - 01:07:46
        Path : …\npp.7.9.1.portable.x64\notepad++.exe
        Admin mode : OFF
        Local Conf mode : ON
        OS Name : Windows 10 Enterprise (64-bit)
        OS Version : 1809
        OS Build : 17763.1577
        Current ANSI codepage : 1252
        Plugins : mimeTools.dll NppConverter.dll NppExport.dll

        Try removing all but the default plugins (as shown in my debug info) and see if you can still replicate the problem?

        1 Reply Last reply Reply Quote 0
        • astrosofistaA
          astrosofista @Petar Lazović
          last edited by

          Hi @Petar-Lazović, @Alan-Kilborn :

          I can reproduce it if and only if I close the search window in between the mentioned steps. So:

          Steps to reproduce:

          1. Put cursor in line which doesn’t contain text, press CTRL+H, “In Selection” check box is greyed out (you may need to repeat this until check box is greyed out).
          2. Close the Search window
          3. Select text, press CTRL+H, “In Selection” check box is still greyed out. Change to “Find” tab in dialog window, change back to “Replace” tab, “In Selection” check box isn’t greyed out anymore.

          Tested in the following portable version:

          Notepad++ v7.9.1 (64-bit)
          Build time : Nov 2 2020 - 01:07:46
          Path : D:\Aplicaciones\npp.7.9.1.portable.x64\notepad++.exe
          Admin mode : ON
          Local Conf mode : ON
          OS Name : Windows 7 Professional (64-bit)
          OS Build : 7601.24546
          Current ANSI codepage : 1252
          Plugins : BetterMultiSelection.dll mimeTools.dll NppConverter.dll NppExport.dll PythonScript.dll

          Michael VincentM Alan KilbornA 2 Replies Last reply Reply Quote 4
          • Michael VincentM
            Michael Vincent @astrosofista
            last edited by

            @astrosofista

            Agree - same here. I removed all my plugins to test as well.

            Notepad++ v7.9.1 (64-bit)
            Build time : Dec 21 2020 - 18:26:49
            Path : C:\usr\bin\npp64\notepad++.exe
            Admin mode : OFF
            Local Conf mode : ON
            OS Name : Windows 10 Enterprise (64-bit)
            OS Version : 1909
            OS Build : 18363.1256
            Current ANSI codepage : 1252
            Plugins : none

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

              All,

              In the recent similar topic, I had tried without closing the dialog in between, so I had weighed in on saying “works for me” and didn’t confirm the bug.

              • ![](https://i.imgur.com/6LBWfzl.gif)

              However, with this new sequence, closing the dialog between, I do agree that the behavior doesn’t make sense.

              • ![](https://i.imgur.com/Gnecstv.gif)

              If someone wants to post a github issue on this one, feel free to use the latter or both my animations.

              Since Alan and I had previously convinced ourselves here (and I think Scott may have convinced himself previously in the issues tracker) that there wasn’t a bug, make sure to be explicit with comparing the sequence that does work as expected (leaving the dialog open) vs the sequence that fails (closing the dialog in between). Post a link to this thread ([see Community Forum "Bug: Replace ''in Selection'' greyed out"](https://community.notepad-plus-plus.org/topic/20506/)) in the bug report, because seeing this conversation will help give credence to the report. I think the animation(s) might help (embedding markdown shown below each image).

              If someone does create that issue, make sure to paste a link to the issue here.

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

                @astrosofista said in BUG: Replace "In selection" greyed out:

                can reproduce it if and only if I close the search window in between the mentioned step

                Ah, yes, that’s the key step to reproduction; thanks @astrosofista !

                So, it is a bug, but hardly an “end-of-the-world-can-never-enable-In selection-type” bug…because there is an easy workaround.

                1 Reply Last reply Reply Quote 4
                • mkupperM
                  mkupper
                  last edited by

                  Here are some more comments that may help with understanding and debugging what’s happening.

                  The updating of the ‘In selection’ area seems to happen well after the Find/replace dialog box is painted.

                  In step one where the cursor is in a blank area of the file and no text is selected do Ctrl-H and watch the ‘In selection’ area. If it shows a black box and ‘In selection’ in black then press Esc and then Ctrl-H again while continuing to watch the ‘In selection’ area. Eventually you will see black box and ‘In selection’ in black pop up and then quickly change to gray. It looks like the words ‘In selection’ go gray first and then the box.

                  Once you have a gray box and ‘In selection’ then press Esc to close the dialog box and select some text. The size of the selected area does not matter. It can be one character or the entire file. The method of selection does not seem to matter. You can use the mouse or keyboard. Now do Ctrl-H. You will see that ‘In selection’ and its box are grayed out. This is the random grayness people have been seeing. Press Esc to close the dialog box and Ctrl-H again while watching where ‘In selection’ will be painted. You should see the ‘In selection’ box being painted in black shortly after the dialog box has been opened. It’s possible both the box and the words ‘In selection’ were in gray but on my machine the repainting to black is too fast for me to confirm it’s all gray and then repainted. I am seeing the black box painted after the dialog box is up.

                  Also, while I have been switching to the ‘Find’ tab and back to ‘Replace’ to fix an undesired grayed out ‘In selection’ I found that it does not matter which tab of the dialog box you use. You can switch to ‘Find in Files’, which does not have an ‘In selection’ field and back or you can switch to ‘Mark’ and back. When switching to ‘Find’ and ‘Mark’ you’ll see that ‘In selection’ is in black.

                  This issue can also be reproduced using Ctrl-F for Find or Ctrl-M for Mark. The buggy behavior with the grayed ‘In selection’ is the same as with using Ctrl-H for Replace.

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