Compare commits
14 Commits
667493fbc4
...
9aa119dc5b
Author | SHA1 | Date |
---|---|---|
celso | 9aa119dc5b | |
celso | b72575e0ba | |
celso | b9e3a50a5e | |
celso | 3a5cb6f5fa | |
celso | 290270185f | |
celso | 71e9008164 | |
celso | 74f7d621e1 | |
celso | 636c250557 | |
celso | 24b6482415 | |
Lucas de Sena | a0274bc20e | |
Hiltjo Posthuma | 5dbcca4926 | |
Hiltjo Posthuma | d63b9eb902 | |
DOGMAN | 497a756382 | |
Hiltjo Posthuma | 8c68ec5241 |
|
@ -1,5 +1,5 @@
|
|||
# st version
|
||||
VERSION = 0.9.1
|
||||
VERSION = 0.9.2
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
|
|
15
st.c
15
st.c
|
@ -112,8 +112,8 @@ enum escape_state {
|
|||
|
||||
typedef struct {
|
||||
Glyph attr; /* current char attributes */
|
||||
int x; /* terminal column */
|
||||
int y; /* terminal row */
|
||||
int x;
|
||||
int y;
|
||||
char state;
|
||||
} TCursor;
|
||||
|
||||
|
@ -1361,6 +1361,7 @@ csiparse(void)
|
|||
{
|
||||
char *p = csiescseq.buf, *np;
|
||||
long int v;
|
||||
int sep = ';'; /* colon or semi-colon, but not both */
|
||||
|
||||
csiescseq.narg = 0;
|
||||
if (*p == '?') {
|
||||
|
@ -1378,7 +1379,9 @@ csiparse(void)
|
|||
v = -1;
|
||||
csiescseq.arg[csiescseq.narg++] = v;
|
||||
p = np;
|
||||
if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ)
|
||||
if (sep == ';' && *p == ':')
|
||||
sep = ':'; /* allow override to colon once */
|
||||
if (*p != sep || csiescseq.narg == ESC_ARG_SIZ)
|
||||
break;
|
||||
p++;
|
||||
}
|
||||
|
@ -2405,16 +2408,12 @@ tstrsequence(uchar c)
|
|||
void
|
||||
tcontrolcode(uchar ascii)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
switch (ascii) {
|
||||
case '\t': /* HT */
|
||||
tputtab(1);
|
||||
return;
|
||||
case '\b': /* BS */
|
||||
for (i = 1; term.c.x && term.line[term.c.y][term.c.x - i].u == 0; ++i)
|
||||
;
|
||||
tmoveto(term.c.x - i, term.c.y);
|
||||
tmoveto(term.c.x-1, term.c.y);
|
||||
return;
|
||||
case '\r': /* CR */
|
||||
tmoveto(0, term.c.y);
|
||||
|
|
17
x.c
17
x.c
|
@ -1235,7 +1235,7 @@ xinit(int cols, int rows)
|
|||
{
|
||||
XGCValues gcvalues;
|
||||
Cursor cursor;
|
||||
Window parent;
|
||||
Window parent, root;
|
||||
pid_t thispid = getpid();
|
||||
XColor xmousefg, xmousebg;
|
||||
|
||||
|
@ -1275,16 +1275,19 @@ 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 = XRootWindow(xw.dpy, xw.scr);
|
||||
xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t,
|
||||
parent = root;
|
||||
xw.win = XCreateWindow(xw.dpy, root, 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, parent, GCGraphicsExposures,
|
||||
dc.gc = XCreateGC(xw.dpy, xw.win, GCGraphicsExposures,
|
||||
&gcvalues);
|
||||
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
|
||||
DefaultDepth(xw.dpy, xw.scr));
|
||||
|
@ -1724,6 +1727,9 @@ xseticontitle(char *p)
|
|||
XTextProperty prop;
|
||||
DEFAULT(p, opt_title);
|
||||
|
||||
if (p[0] == '\0')
|
||||
p = opt_title;
|
||||
|
||||
if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
|
||||
&prop) != Success)
|
||||
return;
|
||||
|
@ -1738,6 +1744,9 @@ xsettitle(char *p)
|
|||
XTextProperty prop;
|
||||
DEFAULT(p, opt_title);
|
||||
|
||||
if (p[0] == '\0')
|
||||
p = opt_title;
|
||||
|
||||
if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
|
||||
&prop) != Success)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue