tRefactor the innermost loop of the xdraws function - st - [fork] customized bu… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c2fd2754ebea6f802e4c71219af269c58b78262e | |
parent 27b28f1dc264e9947ea22bd64fd8f00ac98442f5 | |
Author: Silvan Jegen <[email protected]> | |
Date: Fri, 6 Jun 2014 22:09:22 +0200 | |
Refactor the innermost loop of the xdraws function | |
Signed-off-by: Silvan Jegen <[email protected]> | |
Signed-off-by: Christoph Lohmann <[email protected]> | |
Diffstat: | |
M st.c | 34 +++++++++++++----------------… | |
1 file changed, 14 insertions(+), 20 deletions(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -3245,28 +3245,22 @@ xdraws(char *s, Glyph base, int x, int y, int charlen,… | |
bytelen -= u8cblen; | |
doesexist = XftCharExists(xw.dpy, font->match, unicode… | |
- if(oneatatime || !doesexist || bytelen <= 0) { | |
- if(oneatatime || bytelen <= 0) { | |
- if(doesexist) { | |
- u8fl++; | |
- u8fblen += u8cblen; | |
- } | |
- } | |
- | |
- if(u8fl > 0) { | |
- XftDrawStringUtf8(xw.draw, fg, | |
- font->match, xp, | |
- winy + font->ascent, | |
- (FcChar8 *)u8fs, | |
- u8fblen); | |
- xp += xw.cw * u8fl; | |
- | |
- } | |
- break; | |
+ if(doesexist) { | |
+ u8fl++; | |
+ u8fblen += u8cblen; | |
+ if(!oneatatime && bytelen > 0) | |
+ continue; | |
} | |
- u8fl++; | |
- u8fblen += u8cblen; | |
+ if(u8fl > 0) { | |
+ XftDrawStringUtf8(xw.draw, fg, | |
+ font->match, xp, | |
+ winy + font->ascent, | |
+ (FcChar8 *)u8fs, | |
+ u8fblen); | |
+ xp += xw.cw * u8fl; | |
+ } | |
+ break; | |
} | |
if(doesexist) { | |
if(oneatatime) |