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
      137
      6 Votes
      137 Posts
      45k Views
      CoisesC
      @guy038 said: As for the first bug, I humbly apologize for the inconvenience caused : it’s my own fault. There’s no bug at all ! Maybe, maybe not. I forgot about a Notepad++ setting. I would guess that you have Settings | Preferences… | Editing 1 | Keep selection when right-click outside of selection checked. If I check that box, behavior is consistent with what you reported. Is that a bug? Scintilla normally responds to a right-click by clearing any selection and placing the caret at the position of the right-click, unless the right-click is within an existing selection. Notepad++ specifically captures right-clicks and overrides that behavior when that box is checked, so that right-click effectively behaves just like pressing the context menu key or Shift+F10, ignoring where you right-clicked and basing the context menu on the selection or caret location. I’m inclined to think that if someone has that box checked they probably know what to expect… but then, you didn’t. I haven’t yet investigated, but I suspect it would be possible to bypass that setting by capturing the actual screen location of the right-click, converting that to a character position, and acting accordingly. The question is, should I? To end, could you verify if you can reproduce the third bug or if I forgot something obvious ? Now, if you change the search string and try again to select the default Show option, NO change occurs at all. You need to first cancel the previous Show operation by running, within the Tools dialog, the Remove marks and bookmarks from active document option Then the Show feature applied to the modified search is correctly performed ! This isn’t really a bug, but a “feature” of questionable utility. Commands with default scope apply to marked text if there is any marked text, unless Settings | Marked Text | Default commands automatically search within marked text. is not checked. So most likely you see “No matches found in marked text.” at the bottom of the dialog when you attempt your second Show. If you used Show in Whole Document it would have worked. I agree, this is probably confusing. I didn’t want different default scope commands to behave differently, but this does seem like an exceptional case. I already have a checkbox for Allow default Mark command to Mark in Marked Text; I should probably have a similar Allow default Show command to Show in Marked Text, unchecked by default. Perhaps I should redesign this whole default scope concept. I just don’t know how to keep it flexible and convenient and user-friendly all at once. (I include a reasonably clean design, as in “dialog not so cluttered with buttons and options that your eyes hurt just looking at it” as part of user-friendly. Yet so is minimizing the “User Astonishment Factor”: as in, “Wow, I never expected that to happen!”)
    • B

      Why headings are not displayed in the function list menu ?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      1
      0 Votes
      4 Posts
      33 Views
      PeterJonesP
      @behrouz1 , All your setup – directories, file names, and the overrideMap association – look right. It looks like your function list regex can be slightly modified to make it work. The .* from ^[\t ]*#+[\t ]+(.*)$ is matching across multiple lines, because the default for the .-matches-newline switch in the regex engine is “on”. Using (?-s) or equivalent is highly recommended for the function name matching. So with that slight tweak, I was able to make yours work: <?xml version="1.0" encoding="UTF-8"?> <NotepadPlus> <functionList> <parser id="markdown_headers" displayName="Markdown Headers" commentExpr=""> <function mainExpr="(?-s)^[\t ]*#+[\t ]+(.*)$"> <functionName> <nameExpr expr="(?-s:^[\t ]*#+[\t ]+)(.*)$"/> </functionName> </function> </parser> </functionList> </NotepadPlus> [image: 1788982096187-54ef08c9-6c21-49b6-abd7-eda135c22f6b-image.jpeg] You also might want to try mine (linked above), because it also handles “underlined header” syntax, like: This is a header ---- blah So is this ==== And those “underlined header” syntaxes are recognized by many markdown parsers (including the one for this forum).
    • FranciscoF

      rename files

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      74 Views
      guy038G
      Hello, @francisco, @gerdb42 and All, There are plenty of solutions ! The following one will ensure that the . matches newline option will not be used even it’s checked and that the Match case option is enabled even it’s not checked ! FIND (?-si)_.+(?=\.txt) REPLACE Leave EMPTY Best Regards, guy038