Mercurial > vim
comparison src/terminal.c @ 12447:b1877a367415 v8.0.1103
patch 8.0.1103: converting cterm color fails for grey ramp
commit https://github.com/vim/vim/commit/478e3a78c37de214aadf7399fac77227b7316f40
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 14 13:37:00 2017 +0200
patch 8.0.1103: converting cterm color fails for grey ramp
Problem: Converting cterm color fails for grey ramp.
Solution: Use index instead of number.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 14 Sep 2017 13:45:04 +0200 |
parents | 65de672be458 |
children | 5d228b1cda64 |
comparison
equal
deleted
inserted
replaced
12446:02b60956b30a | 12447:b1877a367415 |
---|---|
2435 } | 2435 } |
2436 else if (nr < 256) | 2436 else if (nr < 256) |
2437 { | 2437 { |
2438 /* 24 grey scale ramp */ | 2438 /* 24 grey scale ramp */ |
2439 idx = nr - 232; | 2439 idx = nr - 232; |
2440 rgb->blue = grey_ramp[nr]; | 2440 rgb->blue = grey_ramp[idx]; |
2441 rgb->green = grey_ramp[nr]; | 2441 rgb->green = grey_ramp[idx]; |
2442 rgb->red = grey_ramp[nr]; | 2442 rgb->red = grey_ramp[idx]; |
2443 } | 2443 } |
2444 } | 2444 } |
2445 | 2445 |
2446 /* | 2446 /* |
2447 * Create a new vterm and initialize it. | 2447 * Create a new vterm and initialize it. |