Skip to content
  • Matan Ziv-Av's avatar
    Fix bug in Bidi mapping visual to logical positions · 65ae0a04
    Matan Ziv-Av authored and Kurt Hindenburg's avatar Kurt Hindenburg committed
    There are three positions for each character:
    - Logical (where it is in the text, extended characters count as one)
    - Visual (where it is on the screen)
    - Line (where it is in the text, extended characters are expanded).
    
    In TerminalDisplay::bidiMap, the calculation of visual to line map, used
    logical instead of visual in one place. This causes using an uninitialized
    memory as an index to an array, as well as other issues.
    
    When no extended characters are used, line and logical are the same. When
    no bidi characters (Arabic or Hebrew) are used, visual and logical are the
    same.
    
    BUG: 461478
    (cherry picked from commit da3b7b1d)
    65ae0a04