commit ad505e7fff67064668529a76025d43bdb3ef13e4
parent e7557a9293699f860e9634954ca9af99a034e770
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 11 Feb 2019 20:44:30 +0100
display: represent half of a double-width character with "[" and "]"
When the screen's edge leaves just one column for a two-column
character, then show its left half as "[" and its right half as "]".
(They used to be shown as ">" and "<", but these characters will be
repurposed in the next commit.)
This addresses https://savannah.gnu.org/bugs/?55657.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -1903,8 +1903,8 @@ char *display_string(const char *buf, size_t column, size_t span, bool isdata)
column++;
}
- /* Display the right half of a two-column character as '<'. */
- converted[index++] = '<';
+ /* Display the right half of a two-column character as ']'. */
+ converted[index++] = ']';
column++;
buf += parse_mbchar(buf, NULL, NULL);
}
@@ -1993,9 +1993,9 @@ char *display_string(const char *buf, size_t column, size_t span, bool isdata)
index = move_mbleft(converted, index);
#ifdef ENABLE_UTF8
- /* Display the left half of a two-column character as '>'. */
+ /* Display the left half of a two-column character as '['. */
if (mbwidth(converted + index) == 2)
- converted[index++] = '>';
+ converted[index++] = '[';
#endif
}