Skip to content

Fix bug in Bidi mapping visual to logical positions

Matan Ziv-Av requested to merge matan/konsole:bidi-fix into master

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

Merge request reports

Loading