From 385111bd86e0b38667879c3e89506ca1ae98e1df Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 12 Mar 2016 19:23:00 +0100 Subject: patch 7.4.1547 Problem: Getting a cterm highlight attribute that is not set results in the string "-1". Solution: Return an empty string. (Taro Muraoka) --- src/syntax.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/syntax.c') diff --git a/src/syntax.c b/src/syntax.c index e37dacb8f..ac80ab4e7 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -8999,6 +8999,8 @@ highlight_color( n = HL_TABLE()[id - 1].sg_cterm_fg - 1; else n = HL_TABLE()[id - 1].sg_cterm_bg - 1; + if (n < 0) + return NULL; sprintf((char *)name, "%d", n); return name; } -- cgit v1.2.1