Number expression as close folding point

  • 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?

  • @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:

    if I change the close to x999999 other, and add the x to the data row, it now correctly folds to the x999999:

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

  • 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
    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 ?



  • 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

  • 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 !



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

Log in to reply