diff options
Diffstat (limited to 'src/nvim/highlight.c')
-rw-r--r-- | src/nvim/highlight.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index d507f07bca..c992731ee3 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -141,10 +141,9 @@ int hl_get_syn_attr(int ns_id, int idx, HlAttrs at_en) || at_en.rgb_ae_attr != 0 || ns_id != 0) { return get_attr_entry((HlEntry){ .attr = at_en, .kind = kHlSyntax, .id1 = idx, .id2 = ns_id }); - } else { - // If all the fields are cleared, clear the attr field back to default value - return 0; } + // If all the fields are cleared, clear the attr field back to default value + return 0; } void ns_hl_def(NS ns_id, int hl_id, HlAttrs attrs, int link_id, Dict(highlight) *dict) @@ -238,12 +237,11 @@ int ns_get_hl(NS *ns_hl, int hl_id, bool link, bool nodefault) if (link) { if (it.attr_id >= 0) { return 0; - } else { - if (it.link_global) { - *ns_hl = 0; - } - return it.link_id; } + if (it.link_global) { + *ns_hl = 0; + } + return it.link_id; } else { return it.attr_id; } |