Problem with code folding in comment lines

Problem with code folding in comment lines

5

    Nov 12, 2007#1

    UltraEdit 13.20+2, Windows XP Pro SP2

    I have added a language definition to wordfile.txt (for PowerShell) with these lines:

    Code: Select all

    /L14"PowerShell" Nocase DisableMLS Line Comment = # String Chars = "' Escape Character = ` File Extensions = PS1
    /Delimiters = :;(){}[] ,#
    /Indent Strings = "{" "if" "else" ":"
    /Unindent Strings = "}"
    /Open Brace Strings =  "{"
    /Close Brace Strings = "}"
    /Open Fold Strings = "{"
    /Close Fold Strings = "}"
    /Open Comment Fold Strings = "Region"
    /Close Comment Fold Strings = "Endregion"
    
    Code folding is enabled for #Region/#Endregion lines and for functions. What I want is for code folding to only be enabled for the comment line strings (#Region/#Endregion) and not for functions. But if I remove the /Open Fold Strings and /Close Fold Strings lines, then the other type of folding fails to work.

    Is this a bug or is there a workaround for this?

    Thanks,
    Chuck

    6,603548
    Grand MasterGrand Master
    6,603548

      Nov 12, 2007#2

      Simply specify open and close fold string not present ever anywhere in your PSL files like:

      /Open Fold Strings = "openfoldnotused"
      /Close Fold Strings = "closefoldnotused"
      Best regards from an UC/UE/UES for Windows user from Austria

      5

        Nov 13, 2007#3

        Mofi, thanks, your suggestion works perfectly!

        Chuck