diff options
author | Christoph Lohmann <20h@r-36.net> | 2015-08-30 11:29:23 +0200 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2015-08-30 11:29:23 +0200 |
commit | 0c94f8621b738c51c9e08abc3c52fe8dfe24b953 (patch) | |
tree | 6ca8cc77e3ba7cc1a72f19683e2d7f3d19aef76d /st.c | |
parent | 0d838b72437c6cac0d87366352939fdb86c2b697 (diff) | |
parent | 7e61f5e4c514a233250442263b62d887c9e5ca9c (diff) | |
download | st-0c94f8621b738c51c9e08abc3c52fe8dfe24b953.tar.gz st-0c94f8621b738c51c9e08abc3c52fe8dfe24b953.zip |
Merge branch 'master' of ssh://suckless.org/gitrepos/st
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2896,15 +2896,15 @@ tputc(Rune u) | |||
2896 | int width, len; | 2896 | int width, len; |
2897 | Glyph *gp; | 2897 | Glyph *gp; |
2898 | 2898 | ||
2899 | control = ISCONTROL(u); | ||
2899 | len = utf8encode(u, c); | 2900 | len = utf8encode(u, c); |
2900 | if ((width = wcwidth(u)) == -1) { | 2901 | if (!control && (width = wcwidth(u)) == -1) { |
2901 | memcpy(c, "\357\277\275", 4); /* UTF_INVALID */ | 2902 | memcpy(c, "\357\277\275", 4); /* UTF_INVALID */ |
2902 | width = 1; | 2903 | width = 1; |
2903 | } | 2904 | } |
2904 | 2905 | ||
2905 | if (IS_SET(MODE_PRINT)) | 2906 | if (IS_SET(MODE_PRINT)) |
2906 | tprinter(c, len); | 2907 | tprinter(c, len); |
2907 | control = ISCONTROL(u); | ||
2908 | 2908 | ||
2909 | /* | 2909 | /* |
2910 | * STR sequence must be checked before anything else | 2910 | * STR sequence must be checked before anything else |