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
|
||||
*/
|
||||
unsigned int tabspaces = 8;
|
||||
unsigned int tabspaces = 8; /* must be > 0 */
|
||||
|
||||
/* Terminal colors (16 first used in escape sequence) */
|
||||
static const char *colorname[] = {
|
||||
|
||||
@@ -712,19 +712,24 @@ execsh(char *cmd, char **args)
|
||||
void
|
||||
sigchld(int a)
|
||||
{
|
||||
int stat;
|
||||
int stat, olderrno;
|
||||
pid_t p;
|
||||
|
||||
if ((p = waitpid(pid, &stat, WNOHANG)) < 0)
|
||||
die("waiting for pid %hd failed: %s\n", pid, strerror(errno));
|
||||
olderrno = 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;
|
||||
}
|
||||
|
||||
if (WIFEXITED(stat) && WEXITSTATUS(stat))
|
||||
die("child exited with status %d\n", WEXITSTATUS(stat));
|
||||
else if (WIFSIGNALED(stat))
|
||||
die("child terminated due to signal %d\n", WTERMSIG(stat));
|
||||
if ((WIFEXITED(stat) && WEXITSTATUS(stat)) || WIFSIGNALED(stat))
|
||||
_exit(1);
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
@@ -965,6 +970,9 @@ tsetdirt(int top, int bot)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (term.row <= 0)
|
||||
return;
|
||||
|
||||
LIMIT(top, 0, term.row-1);
|
||||
LIMIT(bot, 0, term.row-1);
|
||||
|
||||
@@ -1211,8 +1219,10 @@ tsetchar(Rune u, const Glyph *attr, int x, int y)
|
||||
term.line[y][x+1].mode &= ~ATTR_WDUMMY;
|
||||
}
|
||||
} else if (term.line[y][x].mode & ATTR_WDUMMY) {
|
||||
term.line[y][x-1].u = ' ';
|
||||
term.line[y][x-1].mode &= ~ATTR_WIDE;
|
||||
if (x > 0) {
|
||||
term.line[y][x-1].u = ' ';
|
||||
term.line[y][x-1].mode &= ~ATTR_WIDE;
|
||||
}
|
||||
}
|
||||
|
||||
term.dirty[y] = 1;
|
||||
@@ -2358,6 +2368,7 @@ eschandle(uchar ascii)
|
||||
resettitle();
|
||||
xloadcols();
|
||||
xsetmode(0, MODE_HIDE);
|
||||
xsetmode(0, MODE_BRCKTPASTE);
|
||||
break;
|
||||
case '=': /* DECPAM -- Application keypad */
|
||||
xsetmode(1, MODE_APPKEYPAD);
|
||||
@@ -2678,9 +2689,9 @@ draw(void)
|
||||
/* adjust cursor position */
|
||||
LIMIT(term.ocx, 0, term.col-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--;
|
||||
if (term.line[term.c.y][cx].mode & ATTR_WDUMMY)
|
||||
if (cx > 0 && (term.line[term.c.y][cx].mode & ATTR_WDUMMY))
|
||||
cx--;
|
||||
|
||||
drawregion(0, 0, term.col, term.row);
|
||||
|
||||
Reference in new issue
Block a user