Community
    • Login

    Bug with folding in user-defined language

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    2 Posts 1 Posters 7.5k 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.
    • Gerd MüllerG Offline
      Gerd Müller
      last edited by

      Hi all,
      I assume there is a little bug in the folding process.

      Firstly excuse me for my English but it’s not my native language. So please ignore any grammar failures and sorry for that!

      I have defined my own user language with separate open and close definitions. In general this works perfect and is very helpfully for our documentation. But in some cases (when I cascade such folding blocks) there are some trouble. The lines marked on the left side with the +/- sign are not matching with the real lines. When I fold such inner block, mostly the complete file to the end or the block with a wrong line number is folded. This error only occurs, when I have defined more than one block. I used the version 6.7.5 and upgraded now to 6.8 with the same problem. Did anyone known this problem?

      Here is an example for the definitions:
      Folding in code 1 styler
      open: #(
      close: #[

      Here a code text:
      #(001-005) headline 1
      #(001) step 1
      some comments here
      #[yyyymmd hh:mm] finish step 1
      #(002) step 2
      some comments here
      #[yyyymmd hh:mm] finish step 2
      …
      #[closing group 1 to 5]
      …

      With a click on the - sign left of line #(001) the block step 1 is folded, same with the others. If I click on the +/- sign left of the first line the complete group is closed or opened.

      But sometimes (repeatable, often after larger comment blocks (without the signs for block start/end)) the line counter counts a wrong number and the block end marker is not in the line of the close-definition. Even the next start is moved and not synchron to the line with the open definition.
      An interessting effect: If I change one character in the block (even if I change a space through a new space) the marking is renewed an shows the exact lines, but if I move the cursor to an other location and scroll back to the block the mark of the block is wrong.

      A long text for a little problem :)
      But I love Notepad++ and I were very happy if this bug would be fixed in one of the next releases.
      Thank you a lot and have a nice day(s).

      Gerd MüllerG 1 Reply Last reply Reply Quote 0
      • Gerd MüllerG Offline
        Gerd Müller @Gerd Müller
        last edited by Gerd Müller

        here is an update to this bug:

        The problem only exist if I additional define a Comment&Number style (its equal if the style is defined as a comment line style with an open and a close condition or as a comment style). In both cases the folding defined by the Folder&Style (Folding in code 1 style) doesn’t works correctly.

        1 Reply Last reply Reply Quote 0

        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