tren: render double width characters - neatvi - [fork] simple vi-type editor with UTF-8 support
 (HTM) git clone git://src.adamsgaard.dk/neatvi
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 29b4fa028ebed5c2b2a9a7e13bce07ab2ae81587
 (DIR) parent 141f09f6ec82e918ff772e02500c7903be72e50e
 (HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
       Date:   Sat, 12 Dec 2020 01:16:32 +0330
       
       ren: render double width characters
       
       Diffstat:
         M ren.c                               |       2 +-
         M uc.c                                |       2 +-
       
       2 files changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/ren.c b/ren.c
       t@@ -154,7 +154,7 @@ int ren_cwid(char *s, int pos)
                for (i = 0; !conf_placeholder(i, &src, &dst, &wid); i++)
                        if (uc_code(src) == uc_code(s))
                                return wid;
       -        return 1;
       +        return uc_wid(s);
        }
        
        char *ren_translate(char *s, char *ln)
 (DIR) diff --git a/uc.c b/uc.c
       t@@ -595,7 +595,7 @@ int uc_isbell(char *s)
                if (c == ' ' || c == '\t' || c == '\n' || (c <= 0x7f && isprint(c)))
                        return 0;
                c = uc_code(s);
       -        return uc_isdw(c) || uc_iszw(c) || find(c, bchars, LEN(bchars));
       +        return uc_iszw(c) || find(c, bchars, LEN(bchars));
        }
        
        /* nonprintable characters */