]> granicus.if.org Git - vim/commitdiff
patch 8.0.1103: converting cterm color fails for grey ramp v8.0.1103
authorBram Moolenaar <Bram@vim.org>
Thu, 14 Sep 2017 11:37:00 +0000 (13:37 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 14 Sep 2017 11:37:00 +0000 (13:37 +0200)
Problem:    Converting cterm color fails for grey ramp.
Solution:   Use index instead of number.

src/terminal.c
src/version.c

index 624d61c4389db8d1036d130d5857394180479850..4e8f370c8f0fe52c95477026c25cbb9fab52375f 100644 (file)
@@ -2437,9 +2437,9 @@ cterm_color2rgb(int nr, VTermColor *rgb)
     {
        /* 24 grey scale ramp */
        idx = nr - 232;
-       rgb->blue  = grey_ramp[nr];
-       rgb->green = grey_ramp[nr];
-       rgb->red   = grey_ramp[nr];
+       rgb->blue  = grey_ramp[idx];
+       rgb->green = grey_ramp[idx];
+       rgb->red   = grey_ramp[idx];
     }
 }
 
index 6acd6453ab6253dc28cb6be060dc33337c36a519..f0d745b429d48a55668fcc952713d0f318ce421a 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1103,
 /**/
     1102,
 /**/