nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 47f3dc75d8093fedee0a1150948902de8ec8d30c
parent 5f529a48e6bfe679981835290e4f54bc894b3357
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 15 Mar 2019 14:43:15 +0100

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.

Diffstat:
Msrc/winio.c | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/winio.c b/src/winio.c @@ -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);