Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      177
      7 Votes
      177 Posts
      55k Views
      CoisesC
      @guy038 said: Thank you for taking a look at this! Now, using the Remove marks from active document option ( Ctrl + Shift + R ), it deleted any marked text. However the bookmarks remain. Is this behavior logical as you said that, even when the Bookmark lines when marking text is not checked, the Keep bookmarks synchronized with marked text option is still honored ? It is behaving as designed, though the intent may be unclear. For the record, what I wrote was: The Bookmark lines when marking text option at the bottom right is identical to the menu setting; it’s just in this dialog so you don’t have to open the menu a second time to see or change it. The other options in this dialog are only relevant when this box is checked; unchecking it, or the equivalent menu setting, keeps Search++ from doing anything with bookmarks, with one exception: the new Synchronize bookmarks to marked text command. The new Synchronize bookmarks to marked text command applies the policy selected for Bookmark every line containing marked text or Bookmark only the first line of each match or selection regardless of any other settings, including Bookmark lines when marking text. The Keep bookmarks synchronized with marked text option only applies to Tools menu commands that affect bookmarks, except for the special cases listed: Remove marks from multiple documents… (which has a check box in the dialog) and Synchronize bookmarks to marked text (which always does what it says). Except for Synchronize bookmarks to marked text, Tools menu commands do not affect bookmarks unless Bookmark lines when marking text is checked. I think the design makes sense, but I wish I knew how to make it more obvious. You turn Bookmark lines when marking text on or off depending on whether you want Search++ to manipulate bookmarks at all. The only exception is Synchronize bookmarks to marked text, because it’s the only command that has no other effect than to manipulate bookmarks. (I could disable that command when Bookmark lines when marking text is unchecked, but I don’t see the point. As it is, it’s a quick way to get bookmarks for marked text even if you usually don’t want Search++ messing with your bookmarks.) THIRD test : Again, I marked the two words with a Mark command. Thus, the snapshot below : [image: 1790513778688-af1745d6-6e7e-4036-a04f-e86675835818-image.jpeg] Then, I used the Invert marked text option ( Crl + Shift + I ). I got this snapshot : [image: 1790513817663-c0bbc189-4c13-4fd8-a8d3-a2920d7ad3c4-image.jpeg] That’s not exactly what I expected ! It worked as designed, but the design might not be very useful. I wanted to invert all the bookmarks, FIRST and SECONDLY, mark the contents of all the lines having a bookmark ! That’s an interesting thought. Not what Invert marked text does, but interesting. Invert mark test proceeds in the opposite manner: first it marks every character that wasn’t marked and unmarks every character that was marked. Then, depending on the bookmark options, it either does nothing with bookmarks or it bookmarks every line containing any marked text (or the first line of each unbroken span of marked text, depending on the every line / first line setting). To do so, instead of searching the test word, I needed to use the regex ^((?!test).)*$ and I chose again the Mark command to get this behavior. Of course, @coises, to imagine the negative regex ^((?!test).)*$ compared to the positive regex test is easy enough with that simple example. However, how to quickly determine a correct negative regex vs a complicated positive regex ? I did think of Invert marked text as a way to search in a negative space, but I didn’t think of someone perhaps wanting to apply it to whole lines rather than to characters. I did notice that (with or without bookmarks, but more obvious with them) the results of Invert marked text can be unexpected, because line endings count as characters for which marking is inverted. If you have Keep bookmarks synchronized with marked text checked and you aren’t showing line endings, unexpected bookmarks can appear where there seems to be nothing marked, because the line endings are marked. So far, I haven’t had a “real world” case where I wanted Invert marked text for anything, but it hasn’t been available (even to me) for all that long yet. I have to consider this some more, but I’m thinking that Invert marked text isn’t something that would be used very often, so it doesn’t have to be one click: it might be better to replace the single action with a dialog that lets you choose details about how you want to “negate” the text indicated by marks. Suggestions welcome!
    • donhoD

      Notepad++ release 8.9.8.1

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      15
      3 Votes
      15 Posts
      1k Views
      donhoD
      @Artur-Harison I don’t think the 2 issues you have are the regressions. Could you open these 2 issues on Github?
    • Vitalii DovganV

      Improving Find in Files performance

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      14
      1 Votes
      14 Posts
      591 Views
      Thomas KnoefelT
      Thanks a lot @guy038 for running the whole thing again, this time it didn’t finish in seconds ;-) Nice to see the results panel still usable with almost 10 million hits, even the jump to line 690 in that DLL at the very end. Interesting that walking the whole drive for those 130 PDFs takes almost the entire run, 5m45 of 5m48 for MultiReplace, and it’s the same picture with the other tools. The 4 “not decodable” are most likely UTF-16 files with an odd number of bytes. N++ simply drops the last byte there, the next MultiReplace build will do the same in Find in Files (Replace leaves them alone, writing them back would lose that byte). Speed is next on my list.
    • T

      Confirmation or disable the Find All in All Opened Documents

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      216 Views
      mpheathM
      @Timothy-Baxendale Need care not to interact with the buttons that do multiple documents. A not so ideal solution as it is external could be to use an AutoIt script to monitor and disable these buttons. ; Window title and text of the button. Global $aWnd[2][2] = [['Find', 'Find All in All &Opened Documents'], _ ['Replace', 'Replace All in All Opened Doc&uments']] ; Keep looping as persistant disabling of the buttons is needed. While 1 While ProcessExists('notepad++.exe') For $i1 = 0 To UBound($aWnd) - 1 $hWnd = WinActive($aWnd[$i1][0], $aWnd[$i1][1]) If $hWnd Then If ControlCommand($hWnd, '', $aWnd[$i1][1], 'IsEnabled') Then ControlDisable($hWnd, '', $aWnd[$i1][1]) ExitLoop EndIf EndIf Next Sleep(500) WEnd Sleep(1000) WEnd The window title text and button text needs to accurate. This text is based on the default English locale. The loops will continue running. If need to pause and use the buttons, then the icon in the System Tray will pause the script on click. Click Script Paused to uncheck the item to continue with disabling the buttons. Click Exit to end the script. The AutoIt interpreter and compiler are located: https://www.autoitscript.com/site/autoit/downloads/