Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdaadd5b1e | ||
|
|
2f02c153d5 | ||
|
|
3caed3e78f | ||
|
|
04ce0d643e | ||
|
|
688f70add0 | ||
|
|
0723b7e39e |
No files matched your search
+1
-1
@@ -91,7 +91,7 @@ char *termname = "st-256color";
|
|||||||
*
|
*
|
||||||
* stty tabs
|
* stty tabs
|
||||||
*/
|
*/
|
||||||
unsigned int tabspaces = 8;
|
unsigned int tabspaces = 8; /* must be > 0 */
|
||||||
|
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
/* Terminal colors (16 first used in escape sequence) */
|
||||||
static const char *colorname[] = {
|
static const char *colorname[] = {
|
||||||
|
|||||||
@@ -712,19 +712,24 @@ execsh(char *cmd, char **args)
|
|||||||
void
|
void
|
||||||
sigchld(int a)
|
sigchld(int a)
|
||||||
{
|
{
|
||||||
int stat;
|
int stat, olderrno;
|
||||||
pid_t p;
|
pid_t p;
|
||||||
|
|
||||||
if ((p = waitpid(pid, &stat, WNOHANG)) < 0)
|
olderrno = errno;
|
||||||
die("waiting for pid %hd failed: %s\n", pid, strerror(errno));
|
do {
|
||||||
|
p = waitpid(pid, &stat, WNOHANG);
|
||||||
|
} while (p < 0 && errno == EINTR);
|
||||||
|
|
||||||
if (pid != p)
|
if (p < 0)
|
||||||
|
_exit(1);
|
||||||
|
|
||||||
|
if (pid != p) {
|
||||||
|
errno = olderrno;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (WIFEXITED(stat) && WEXITSTATUS(stat))
|
if ((WIFEXITED(stat) && WEXITSTATUS(stat)) || WIFSIGNALED(stat))
|
||||||
die("child exited with status %d\n", WEXITSTATUS(stat));
|
_exit(1);
|
||||||
else if (WIFSIGNALED(stat))
|
|
||||||
die("child terminated due to signal %d\n", WTERMSIG(stat));
|
|
||||||
_exit(0);
|
_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -965,6 +970,9 @@ tsetdirt(int top, int bot)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (term.row <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
LIMIT(top, 0, term.row-1);
|
LIMIT(top, 0, term.row-1);
|
||||||
LIMIT(bot, 0, term.row-1);
|
LIMIT(bot, 0, term.row-1);
|
||||||
|
|
||||||
@@ -1211,9 +1219,11 @@ tsetchar(Rune u, const Glyph *attr, int x, int y)
|
|||||||
term.line[y][x+1].mode &= ~ATTR_WDUMMY;
|
term.line[y][x+1].mode &= ~ATTR_WDUMMY;
|
||||||
}
|
}
|
||||||
} else if (term.line[y][x].mode & ATTR_WDUMMY) {
|
} else if (term.line[y][x].mode & ATTR_WDUMMY) {
|
||||||
|
if (x > 0) {
|
||||||
term.line[y][x-1].u = ' ';
|
term.line[y][x-1].u = ' ';
|
||||||
term.line[y][x-1].mode &= ~ATTR_WIDE;
|
term.line[y][x-1].mode &= ~ATTR_WIDE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
term.dirty[y] = 1;
|
term.dirty[y] = 1;
|
||||||
term.line[y][x] = *attr;
|
term.line[y][x] = *attr;
|
||||||
@@ -2358,6 +2368,7 @@ eschandle(uchar ascii)
|
|||||||
resettitle();
|
resettitle();
|
||||||
xloadcols();
|
xloadcols();
|
||||||
xsetmode(0, MODE_HIDE);
|
xsetmode(0, MODE_HIDE);
|
||||||
|
xsetmode(0, MODE_BRCKTPASTE);
|
||||||
break;
|
break;
|
||||||
case '=': /* DECPAM -- Application keypad */
|
case '=': /* DECPAM -- Application keypad */
|
||||||
xsetmode(1, MODE_APPKEYPAD);
|
xsetmode(1, MODE_APPKEYPAD);
|
||||||
@@ -2678,9 +2689,9 @@ draw(void)
|
|||||||
/* adjust cursor position */
|
/* adjust cursor position */
|
||||||
LIMIT(term.ocx, 0, term.col-1);
|
LIMIT(term.ocx, 0, term.col-1);
|
||||||
LIMIT(term.ocy, 0, term.row-1);
|
LIMIT(term.ocy, 0, term.row-1);
|
||||||
if (term.line[term.ocy][term.ocx].mode & ATTR_WDUMMY)
|
if (term.ocx > 0 && (term.line[term.ocy][term.ocx].mode & ATTR_WDUMMY))
|
||||||
term.ocx--;
|
term.ocx--;
|
||||||
if (term.line[term.c.y][cx].mode & ATTR_WDUMMY)
|
if (cx > 0 && (term.line[term.c.y][cx].mode & ATTR_WDUMMY))
|
||||||
cx--;
|
cx--;
|
||||||
|
|
||||||
drawregion(0, 0, term.col, term.row);
|
drawregion(0, 0, term.col, term.row);
|
||||||
|
|||||||
@@ -1755,7 +1755,10 @@ xsetcursor(int cursor)
|
|||||||
void
|
void
|
||||||
xseturgency(int add)
|
xseturgency(int add)
|
||||||
{
|
{
|
||||||
XWMHints *h = XGetWMHints(xw.dpy, xw.win);
|
XWMHints *h;
|
||||||
|
|
||||||
|
if (!(h = XGetWMHints(xw.dpy, xw.win)))
|
||||||
|
return;
|
||||||
|
|
||||||
MODBIT(h->flags, add, XUrgencyHint);
|
MODBIT(h->flags, add, XUrgencyHint);
|
||||||
XSetWMHints(xw.dpy, xw.win, h);
|
XSetWMHints(xw.dpy, xw.win, h);
|
||||||
|
|||||||
Reference in new issue
Block a user