Community
    • Login

    Number expression as close folding point

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 799 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.
    • André AlbuquerqueA Offline
      André Albuquerque
      last edited by

      I am creating a UDL. In the language I’m working with, all commands end with 999999. I’m having a problem with folding. It is not working properly when I define the term 999999 as the closing point. Is it possible to use as an closing folding point an expression containing only numbers?

      1 Reply Last reply Reply Quote 1
      • PeterJonesP Offline
        PeterJones
        last edited by

        @André-Albuquerque said in Number expression as close folding point:

        Is it possible to use as an closing folding point an expression containing only numbers?

        Apparently not. At least, I can confirm with UDLv2.1.0.12 and NPP 7.8.4-64, if I define a UDL with Folding In Code 1 Open: open and Close: 999999 other, then it folds to other rather than 999999:
        62b263ea-7e7c-4ff5-b539-5d1dad078eb3-image.png

        if I change the close to x999999 other, and add the x to the data row, it now correctly folds to the x999999:
        55d097f6-cb3a-428e-b081-8a1c068e33bb-image.png

        I can confirm the apparent limitation, but I don’t know how to get around that. Sorry.

        1 Reply Last reply Reply Quote 1
        • guy038G Offline
          guy038
          last edited by

          Hello, @andré-albuquerque, @peterjones and All,

          I think that I found out a work-around :

          Simply use the value 99999 in the Close box, instead of 999999 ( or even 99999 other, for testing )

          For instance, assuming the User Defined Language text, below :

          bla blah
          open
          something
          9
          99
          999
          9999
          99999
          999999
          other
          bla blah
          

          Change the value 99999, in the Close box, by 9999 and so on… till the value 9 and notice the ending line of folding ! Funny, isn’t it ?

          Cheers,

          guy038

          1 Reply Last reply Reply Quote 2
          • PeterJonesP Offline
            PeterJones
            last edited by PeterJones

            That is definitely a bug. If you do the same thing with the letter a instead of the digit 9, it stops on the first line with the proper number of a characters, as it should, rather than requiring one extra a.

            Too bad the UDL subsystem issues don’t ever seem to gain traction. Submitted #8040 anyway

            1 Reply Last reply Reply Quote 2
            • guy038G Offline
              guy038
              last edited by guy038

              Hi, @peterjones,

              I didn’t even think to do tests with letters, instead of digits :-( Many thanks for taking time to open a new issue on GitHub !

              BR

              guy038

              1 Reply Last reply Reply Quote 2
              • André AlbuquerqueA Offline
                André Albuquerque
                last edited by

                Thank you all for the support. The @guy038 work-around is helping for now.

                1 Reply Last reply Reply Quote 2

                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