"Format/Reindent"

"Format/Reindent"

3
NewbieNewbie
3

    3:48 - Nov 19#1

    Expected indentation:

    if
      something
      if
        something
        if
          something
        elseif
          ; in("Case Times","Case Canceled","Case Cancelled"))
          something
        endif;R0
      endif;R0
    endif;R0

    Unexpected Indentation:
    if
      something
      if
        something
        if
          something
        elseif
          in("Case Times","Case Canceled","Case Cancelled")) <-why does this line cause the indentation of subsequent line below to go off/wonky? This seems to also change the way code folder works.
                something
              endif;R0
            endif;R0
          endif;R0

    test2.uew setup:

    Code: Select all

    /L14"TEST2" Line Comment = ; Line Comment Alt = # Block Comment On = /* Block Comment Off = */ Nocase File Extensions = PRG CCL oenexp_script modobj_translate tst
    /Indent Strings = "if" "else" "elseif" "for" "while" "case" "of:" "subroutine"
    /Unindent Strings = "endif" "else" "elseif" "endfor" "endwhile" "endcase" "of:" "end"
    /Open Fold Strings =  "if" "subroutine" "for" "while" "case"
    /Close Fold Strings =  "endif" "end" "endfor" "endwhile" "endcase"
    /Open Brace Strings =  "{" "(" "[" 
    /Close Brace Strings = "}" ")" "]"
    

    6,684586
    Grand MasterGrand Master
    6,684586

      14:04 - Nov 19#2

      The Syntax Highlighting help page describes for Indentation:
      UE help wrote:If an indent string occurs anywhere on a line it will be used for indenting (except when it occurs in quoted/commented text).
      The three occurrences of Case in the three strings in second example should be ignored for indentation. But that is not the case with UltraEdit v2024.1.0.36.

      I made tests with former versions of UltraEdit and found out that the reindenting works as expected up to UltraEdit v2022.0.0.102.

      There was a syntax highlighting parser overhaul in v2022.1.0.90 according to changes.txt in program files folder of UltraEdit. This syntax highlighting issue is definitely a bug of UltraEdit since v2022.1.0.90 up to currently latest v2024.1.0.36. Please report this bug by email to UltraEdit support or using the technical support form. UltraEdit v2024.1 has the command Start support request in menu Help in both toolbar/menu modes and in menu Support at top right in ribbon mode.
      Best regards from an UC/UE/UES for Windows user from Austria