display: use non-breaking space instead of dot for VTE-bug workaround

When UTF-8 is available, it is better to use a character that displays
as a space.

This improves the fix for https://savannah.gnu.org/bugs/?55896.
master
Benno Schulenberg 2019-03-15 14:43:15 +01:00
parent 5f529a48e6
commit 47f3dc75d8
1 changed files with 9 additions and 1 deletions

View File

@ -2696,8 +2696,16 @@ void edit_draw(filestruct *fileptr, const char *converted,
if (*(converted + target_x) != '\0') {
charlen = parse_mbchar(converted + target_x, striped_char, NULL);
target_column = strnlenpt(converted, target_x);
} else if (target_column + 1 == editwincols) {
/* Defeat a VTE bug -- see https://sv.gnu.org/bugs/?55896. */
if (using_utf8()) {
striped_char[0] = '\xC2';
striped_char[1] = '\xA0';
charlen = 2;
} else
striped_char[0] = '.';
} else
striped_char[0] = (target_column + 1 == editwincols) ? '.' : ' ';
striped_char[0] = ' ';
wattron(edit, interface_color_pair[GUIDE_STRIPE]);
mvwaddnstr(edit, row, margin + target_column, striped_char, charlen);