1
0
mirror of git://git.suckless.org/st synced 2025-04-28 19:30:59 +01:00

Compare commits

..

No commits in common. "master" and "0.9.2" have entirely different histories.

2 changed files with 7 additions and 17 deletions

13
st.c

@ -1132,7 +1132,6 @@ csiparse(void)
{
char *p = csiescseq.buf, *np;
long int v;
int sep = ';'; /* colon or semi-colon, but not both */
csiescseq.narg = 0;
if (*p == '?') {
@ -1150,9 +1149,7 @@ csiparse(void)
v = -1;
csiescseq.arg[csiescseq.narg++] = v;
p = np;
if (sep == ';' && *p == ':')
sep = ':'; /* allow override to colon once */
if (*p != sep || csiescseq.narg == ESC_ARG_SIZ)
if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ)
break;
p++;
}
@ -1705,7 +1702,7 @@ csihandle(void)
}
break;
case 1: /* above */
if (term.c.y > 0)
if (term.c.y > 1)
tclearregion(0, 0, term.col-1, term.c.y-1);
tclearregion(0, term.c.y, term.c.x, term.c.y);
break;
@ -1801,11 +1798,7 @@ csihandle(void)
tcursor(CURSOR_SAVE);
break;
case 'u': /* DECRC -- Restore cursor position (ANSI.SYS) */
if (csiescseq.priv) {
goto unknown;
} else {
tcursor(CURSOR_LOAD);
}
tcursor(CURSOR_LOAD);
break;
case ' ':
switch (csiescseq.mode[1]) {

11
x.c

@ -1131,7 +1131,7 @@ xinit(int cols, int rows)
{
XGCValues gcvalues;
Cursor cursor;
Window parent, root;
Window parent;
pid_t thispid = getpid();
XColor xmousefg, xmousebg;
@ -1168,19 +1168,16 @@ xinit(int cols, int rows)
| ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
xw.attrs.colormap = xw.cmap;
root = XRootWindow(xw.dpy, xw.scr);
if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0))))
parent = root;
xw.win = XCreateWindow(xw.dpy, root, xw.l, xw.t,
parent = XRootWindow(xw.dpy, xw.scr);
xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t,
win.w, win.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput,
xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity
| CWEventMask | CWColormap, &xw.attrs);
if (parent != root)
XReparentWindow(xw.dpy, xw.win, parent, xw.l, xw.t);
memset(&gcvalues, 0, sizeof(gcvalues));
gcvalues.graphics_exposures = False;
dc.gc = XCreateGC(xw.dpy, xw.win, GCGraphicsExposures,
dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures,
&gcvalues);
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
DefaultDepth(xw.dpy, xw.scr));