comparison src/terminal.c @ 16312:46e8430738fa v8.1.1161

patch 8.1.1161: unreachable code commit https://github.com/vim/vim/commit/1d79ce81e7be20405f0fa9687b37c86a2215e326 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 12 22:27:39 2019 +0200 patch 8.1.1161: unreachable code Problem: Unreachable code. Solution: Remove condition that will never be true. Add tests for all ANSI colors.
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Apr 2019 22:30:08 +0200
parents 1298cb5c1f72
children b3bc3ba07bef
comparison
equal deleted inserted replaced
16311:94ca56fd6b64 16312:46e8430738fa
2430 int blue = color->blue; 2430 int blue = color->blue;
2431 int green = color->green; 2431 int green = color->green;
2432 2432
2433 if (color->ansi_index != VTERM_ANSI_INDEX_NONE) 2433 if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
2434 { 2434 {
2435 /* First 16 colors and default: use the ANSI index, because these 2435 // The first 16 colors and default: use the ANSI index.
2436 * colors can be redefined, we use the RGB values. */
2437 if (t_colors > 256)
2438 return color->ansi_index;
2439 switch (color->ansi_index) 2436 switch (color->ansi_index)
2440 { 2437 {
2441 case 0: return 0; 2438 case 0: return 0;
2442 case 1: return lookup_color( 0, fg, boldp) + 1; /* black */ 2439 case 1: return lookup_color( 0, fg, boldp) + 1; /* black */
2443 case 2: return lookup_color( 4, fg, boldp) + 1; /* dark red */ 2440 case 2: return lookup_color( 4, fg, boldp) + 1; /* dark red */