summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-12 22:27:39 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-12 22:27:39 +0200
commit1d79ce81e7be20405f0fa9687b37c86a2215e326 (patch)
tree03040323f670dd4465a42f31f9230fcd76c3d52b /src/terminal.c
parentc8b3ddab51cd2901d5946949d02c96e1035b25c0 (diff)
downloadvim-git-1d79ce81e7be20405f0fa9687b37c86a2215e326.tar.gz
patch 8.1.1161: unreachable codev8.1.1161
Problem: Unreachable code. Solution: Remove condition that will never be true. Add tests for all ANSI colors.
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/terminal.c b/src/terminal.c
index c7dc23f90..c0777b2ed 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -2432,10 +2432,7 @@ color2index(VTermColor *color, int fg, int *boldp)
if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
{
- /* First 16 colors and default: use the ANSI index, because these
- * colors can be redefined, we use the RGB values. */
- if (t_colors > 256)
- return color->ansi_index;
+ // The first 16 colors and default: use the ANSI index.
switch (color->ansi_index)
{
case 0: return 0;