Merge remote-tracking branch 'origin/master' into michael
This commit is contained in:
commit
b7c70a3e69
@ -1,5 +1,5 @@
|
||||
# st version
|
||||
VERSION = 0.8.5
|
||||
VERSION = 0.9
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
|
18
st.c
18
st.c
@ -1916,11 +1916,18 @@ csihandle(void)
|
||||
case 'm': /* SGR -- Terminal attribute (color) */
|
||||
tsetattr(csiescseq.arg, csiescseq.narg);
|
||||
break;
|
||||
case 'n': /* DSR – Device Status Report (cursor position) */
|
||||
if (csiescseq.arg[0] == 6) {
|
||||
case 'n': /* DSR -- Device Status Report */
|
||||
switch (csiescseq.arg[0]) {
|
||||
case 5: /* Status Report "OK" `0n` */
|
||||
ttywrite("\033[0n", sizeof("\033[0n") - 1, 0);
|
||||
break;
|
||||
case 6: /* Report Cursor Position (CPR) "<row>;<column>R" */
|
||||
len = snprintf(buf, sizeof(buf), "\033[%i;%iR",
|
||||
term.c.y+1, term.c.x+1);
|
||||
ttywrite(buf, len, 0);
|
||||
break;
|
||||
default:
|
||||
goto unknown;
|
||||
}
|
||||
break;
|
||||
case 'r': /* DECSTBM -- Set Scrolling Region */
|
||||
@ -2079,8 +2086,10 @@ strhandle(void)
|
||||
if (p && !strcmp(p, "?")) {
|
||||
osc_color_response(j, 0, 1);
|
||||
} else if (xsetcolorname(j, p)) {
|
||||
if (par == 104 && narg <= 1)
|
||||
if (par == 104 && narg <= 1) {
|
||||
xloadcols();
|
||||
return; /* color reset without parameter */
|
||||
}
|
||||
fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
|
||||
j, p ? p : "(null)");
|
||||
} else {
|
||||
@ -2566,6 +2575,9 @@ check_control_code:
|
||||
* they must not cause conflicts with sequences.
|
||||
*/
|
||||
if (control) {
|
||||
/* in UTF-8 mode ignore handling C1 control characters */
|
||||
if (IS_SET(MODE_UTF8) && ISCONTROLC1(u))
|
||||
return;
|
||||
tcontrolcode(u);
|
||||
/*
|
||||
* control codes are not shown ever
|
||||
|
9
x.c
9
x.c
@ -2303,7 +2303,7 @@ void
|
||||
kpress(XEvent *ev)
|
||||
{
|
||||
XKeyEvent *e = &ev->xkey;
|
||||
KeySym ksym;
|
||||
KeySym ksym = NoSymbol;
|
||||
char buf[64], *customkey;
|
||||
int len;
|
||||
Rune c;
|
||||
@ -2319,10 +2319,13 @@ kpress(XEvent *ev)
|
||||
if (IS_SET(MODE_KBDLOCK))
|
||||
return;
|
||||
|
||||
if (xw.ime.xic)
|
||||
if (xw.ime.xic) {
|
||||
len = XmbLookupString(xw.ime.xic, e, buf, sizeof buf, &ksym, &status);
|
||||
else
|
||||
if (status == XBufferOverflow)
|
||||
return;
|
||||
} else {
|
||||
len = XLookupString(e, buf, sizeof buf, &ksym, NULL);
|
||||
}
|
||||
/* 1. shortcuts */
|
||||
for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) {
|
||||
if (ksym == bp->keysym && match(bp->mod, e->state)) {
|
||||
|
Loading…
Reference in New Issue
Block a user