Support GNU screen.
This commit is contained in:
committed by
Tatsuya Kinoshita
parent
0c25fd96f7
commit
3f3906151b
11
terms.c
11
terms.c
@@ -595,7 +595,7 @@ put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, i
|
||||
prevstop = mySignal(SIGTSTP, SIG_IGN);
|
||||
|
||||
if ((pid = fork()) == 0) {
|
||||
char *argv[11];
|
||||
char *argv[12];
|
||||
char digit[2][11+1];
|
||||
char clip[44+3+1];
|
||||
Str str_url;
|
||||
@@ -610,6 +610,7 @@ put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, i
|
||||
}
|
||||
ttymode_set(ISIG, 1);
|
||||
|
||||
|
||||
argv[0] = "img2sixel";
|
||||
argv[1] = "-l";
|
||||
argv[2] = do_anim ? "auto" : "disable";
|
||||
@@ -624,7 +625,13 @@ put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, i
|
||||
sx*pixel_per_char_i, sy*pixel_per_line_i);
|
||||
argv[8] = clip;
|
||||
argv[9] = url;
|
||||
argv[10] = NULL;
|
||||
if (getenv("TERM") && strcmp(getenv("TERM"), "screen")) {
|
||||
argv[10] = "-P";
|
||||
argv[11] = NULL;
|
||||
}
|
||||
else {
|
||||
argv[10] = NULL;
|
||||
}
|
||||
execvp(argv[0],argv);
|
||||
exit(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user