diff options
Diffstat (limited to 'src/nvim/highlight.c')
-rw-r--r-- | src/nvim/highlight.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index b01cdde236..5163752e1f 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -517,6 +517,10 @@ static HlAttrs get_colors_force(int attr) /// @return the resulting attributes. int hl_blend_attrs(int back_attr, int front_attr, bool *through) { + if (front_attr < 0 || back_attr < 0) { + return -1; + } + HlAttrs fattrs = get_colors_force(front_attr); int ratio = fattrs.hl_blend; if (ratio <= 0) { |