Menu

Can't get folding right in UDL

Eugene
2013-05-01
2013-05-07
  • Eugene

    Eugene - 2013-05-01

    I'm trying to set up my User Defined Language and I can't get folding to work correctly with my formatting.

    Block look like the following:

    rootBlock
    { <--- should fold here
        param1 value1
    
        innerBlock1
        { <--- should fold here as well
            param2 value2
            param3 value3
        }
    
        innerBlock2
        { <--- and here
            param4 value4
    
            innerBlock3
            { <--- and here
                param5 value 5
            }
        }
    }
    

    I've tried using both Folding in code 1 style and Folding in code 2 style and neither of these gets the folding right; some inner block always ends up folding in the wrong place. Also, if there is no space after the very first { then the root is not foldable when using Folding in code 2 style.

    Any thoughts?

    Thanks!

     
  • Loreia2

    Loreia2 - 2013-05-02

    Hi Eugene,

    current UDL has some issues with folding. Until patch is committed to main branch, you can use latest beta version. Download links are posted in this thread:
    https://sourceforge.net/p/notepad-plus/discussion/331753/thread/01f8c28f?page=23

    If you do try beta version, I'd appretiate a quick info whether it helps you or not.

    BR
    Loreia

     
  • Eugene

    Eugene - 2013-05-07

    Hi,

    I tried the beta version and the folding worked as expected. Thanks!

    Any idea which version of NPP this will go into?

    -Eugene