If SCREEN_VARIANT=sixel on GNU screen, exec img2sixel without -P option.

This commit is contained in:
Araki Ken
2014-10-11 15:46:47 +09:00
committed by Tatsuya Kinoshita
parent df84882eb3
commit f64d6bb899

View File

@@ -625,7 +625,8 @@ 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;
if (getenv("TERM") && strcmp(getenv("TERM"), "screen") == 0) {
if (getenv("TERM") && strcmp(getenv("TERM"), "screen") == 0 &&
(!getenv("SCREEN_VARIANT") || strcmp(getenv("SCREEN_VARIANT"), "sixel") != 0)) {
argv[10] = "-P";
argv[11] = NULL;
}