Xinqi Bao's Git
projects
/
st.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
compact
(merge:
0d838b7
7e61f5e
)
Merge branch 'master' of ssh://suckless.org/gitrepos/st
author
Christoph Lohmann <
[email protected]
>
Sun, 30 Aug 2015 09:29:23 +0000
(11:29 +0200)
committer
Christoph Lohmann <
[email protected]
>
Sun, 30 Aug 2015 09:29:23 +0000
(11:29 +0200)
1
2
st.c
patch
|
diff1
|
diff2
|
blob
|
history
diff --combined
st.c
index
e76aaf3
,
35a840b
..
aaf868d
---
1
/
st.c
---
2
/
st.c
+++ b/
st.c
@@@
-1531,8
-1531,7
+1531,8
@@@
ttywrite(const char *s, size_t n
* This means the buffer is getting full
* again. Empty it.
*/
- ttyread();
+ if (n < 256)
+ ttyread();
n -= r;
s += r;
} else {
@@@
-2896,15
-2895,15
+2896,15
@@@
tputc(Rune u
int width, len;
Glyph *gp;
+ control = ISCONTROL(u);
len = utf8encode(u, c);
- if ((width = wcwidth(u)) == -1) {
+ if (
!control &&
(width = wcwidth(u)) == -1) {
memcpy(c, "\357\277\275", 4); /* UTF_INVALID */
width = 1;
}
if (IS_SET(MODE_PRINT))
tprinter(c, len);
- control = ISCONTROL(u);
/*
* STR sequence must be checked before anything else