diff options
author | noname@inventati.org <noname@inventati.org> | 2015-04-21 23:27:22 +0200 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2015-04-27 08:58:37 +0200 |
commit | 61c35cd24625c6d14b4a2de8bd639da52aa513bd (patch) | |
tree | c85ebb726c0a1a6de37733459ab42bfe30d9c71c | |
parent | 742a41d6554ce1848f45ea89cb83d62c7e881352 (diff) | |
download | st-patched-61c35cd24625c6d14b4a2de8bd639da52aa513bd.tar.bz2 st-patched-61c35cd24625c6d14b4a2de8bd639da52aa513bd.tar.xz st-patched-61c35cd24625c6d14b4a2de8bd639da52aa513bd.zip |
Use utf8len instead of utf8decode.
-rw-r--r-- | st.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -3672,7 +3672,6 @@ drawregion(int x1, int y1, int x2, int y2) { | |||
3672 | Glyph base, new; | 3672 | Glyph base, new; |
3673 | char buf[DRAW_BUF_SIZ]; | 3673 | char buf[DRAW_BUF_SIZ]; |
3674 | bool ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); | 3674 | bool ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); |
3675 | long unicodep; | ||
3676 | 3675 | ||
3677 | if(!(xw.state & WIN_VISIBLE)) | 3676 | if(!(xw.state & WIN_VISIBLE)) |
3678 | return; | 3677 | return; |
@@ -3701,7 +3700,7 @@ drawregion(int x1, int y1, int x2, int y2) { | |||
3701 | base = new; | 3700 | base = new; |
3702 | } | 3701 | } |
3703 | 3702 | ||
3704 | sl = utf8decode(new.c, &unicodep, UTF_SIZ); | 3703 | sl = utf8len(new.c); |
3705 | memcpy(buf+ib, new.c, sl); | 3704 | memcpy(buf+ib, new.c, sl); |
3706 | ib += sl; | 3705 | ib += sl; |
3707 | ic += (new.mode & ATTR_WIDE)? 2 : 1; | 3706 | ic += (new.mode & ATTR_WIDE)? 2 : 1; |