1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

combined: Leave the screen_char attributes unchanged.

The previous code displayed the wrong attributes if the combining
characters were at the end of an HTML link.  For example:

  <a href="#">trickỹ</a> more text <a href="#">second link</a>

  (The characters in the first A element are "tricky" and U+0303
  COMBINING TILDE.)

Here, when the cursor was not at the first link, ELinks displayed
the y-with-tilde cell as if it were not part of the link.
This happened because ELinks had already changed schar->attr
before set_line saw the space character after the link and
flushed document->combi[].
This commit is contained in:
Kalle Olavi Niemitalo 2008-01-10 23:12:47 +02:00 committed by Kalle Olavi Niemitalo
parent 83a4d815ae
commit 2fd3e0b3b3

View File

@ -492,10 +492,8 @@ good_char:
if (document->comb_x != -1) { if (document->comb_x != -1) {
unicode_val_T prev = get_combined(document->combi, document->combi_length + 1); unicode_val_T prev = get_combined(document->combi, document->combi_length + 1);
if (prev != UCS_NO_CHAR) { if (prev != UCS_NO_CHAR)
schar->data = prev; POS(document->comb_x, document->comb_y).data = prev;
copy_screen_chars(&POS(document->comb_x, document->comb_y), schar, 1);
}
} }
document->combi_length = 0; document->combi_length = 0;
} }