nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH 1/3] display: represent half of a double-width chara


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH 1/3] display: represent half of a double-width character with "[" and "]"
Date: Tue, 12 Feb 2019 16:31:01 +0100

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 "<", which will be repurposed.)

This addresses https://savannah.gnu.org/bugs/?55657.
Reported-by: David Lawrence Ramsey <address@hidden>
---
 src/winio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index 0be30fbd..cb279637 100644
--- 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
        }
 
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]