Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fixing a resize bug, if a smaller amount than the lineheight is resized.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
bfbe799
..
2654676
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-2398,9
+2398,6
@@
xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
*temp, revfg, revbg;
XRenderColor colfg, colbg;
*temp, revfg, revbg;
XRenderColor colfg, colbg;
- if(base.mode & ATTR_REVERSE)
- temp = fg, fg = bg, bg = temp;
-
if(base.mode & ATTR_BOLD) {
if(BETWEEN(base.fg, 0, 7)) {
/* basic system colors */
if(base.mode & ATTR_BOLD) {
if(BETWEEN(base.fg, 0, 7)) {
/* basic system colors */
@@
-2450,6
+2447,9
@@
xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
}
}
}
}
+ if(base.mode & ATTR_REVERSE)
+ temp = fg, fg = bg, bg = temp;
+
XftTextExtentsUtf8(xw.dpy, font->xft_set, (FcChar8 *)s, bytelen,
&extents);
width = extents.xOff;
XftTextExtentsUtf8(xw.dpy, font->xft_set, (FcChar8 *)s, bytelen,
&extents);
width = extents.xOff;
@@
-2742,8
+2742,6
@@
cresize(int width, int height)
col = (xw.w - 2*borderpx) / xw.cw;
row = (xw.h - 2*borderpx) / xw.ch;
col = (xw.w - 2*borderpx) / xw.cw;
row = (xw.h - 2*borderpx) / xw.ch;
- if(col == term.col && row == term.row)
- return;
tresize(col, row);
xresize(col, row);
tresize(col, row);
xresize(col, row);
@@
-2752,6
+2750,8
@@
cresize(int width, int height)
void
resize(XEvent *e) {
void
resize(XEvent *e) {
+ fprintf(stderr, "resize -> %d,%d\n", e->xconfigure.width,
+ e->xconfigure.height);
if(e->xconfigure.width == xw.w && e->xconfigure.height == xw.h)
return;
if(e->xconfigure.width == xw.w && e->xconfigure.height == xw.h)
return;