Commit 92a6d45a authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Tomaz Canabrava
Browse files

Revert commit 60b0c9d5

Commit 60b0c9d5 breaks bidi rendering, essentialy making all spaces
hard L2R characters, instead of neutral.

The deleted mostly does not do anything - it groups a
sequence of space which would be grouped anyway.

The problem is the break at the end, which exits the outer loop so
stops grouping after any sequence of space.

It "works" by having more groups, thus the rendering is closer to
rendering each character in its place, mitigating somewhat the issue
caused by non-fixed fonts (fallback to a font with different width).
parent 25f49b72
Pipeline #200106 failed with stage
in 2 minutes and 32 seconds
......@@ -145,24 +145,6 @@ void TerminalPainter::drawContents(Character *image,
// Group spaces following any non-wide character with the character. This allows for
// rendering ambiguous characters with wide glyphs without clipping them.
// NOTE: This happens in the else case too, but we need it here as well.
if (!doubleWidth && next_char.character == ' ' && char_value.equalsFormat(next_char)) {
univec << next_char.character;
while (isInsideDrawArea(x + len)) {
const Character next_char_gp = image[m_parentDisplay->loc(x + len, y)];
if (next_char_gp.character == ' ' && char_value.hasSameColors(next_char_gp) && char_value.hasSameRendition(next_char_gp)) {
univec << next_char_gp.character;
} else {
const uint c = next_char.character;
if ((next_char.rendition & RE_EXTENDED_CHAR) != 0) {
// sequence of characters
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment