diff options
author | Araki Ken <arakiken@users.sf.net> | 2014-09-28 06:09:09 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2014-12-06 11:47:05 +0000 |
commit | 3f3906151bfb2b6138a6950c2ea2c2f0aee03ad6 (patch) | |
tree | e9ff96a6be26ff4d9624313168f5687d59c5bc0c /terms.c | |
parent | Show GIF (except animation GIF) correctly. (diff) | |
download | w3m-3f3906151bfb2b6138a6950c2ea2c2f0aee03ad6.tar.gz w3m-3f3906151bfb2b6138a6950c2ea2c2f0aee03ad6.zip |
Support GNU screen.
Diffstat (limited to '')
-rw-r--r-- | terms.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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); } |