From 095aac57537b5f245662019562437347f6e2589e Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Wed, 9 Mar 2022 19:53:56 +0100 Subject: [PATCH] [bfu] style.c seems to be better place for node_number --- src/bfu/style.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bfu/style.c b/src/bfu/style.c index bc0434a4..a4172f19 100644 --- a/src/bfu/style.c +++ b/src/bfu/style.c @@ -15,6 +15,7 @@ #include "util/color.h" #include "util/hash.h" +unsigned int node_number_counter; struct bfu_color_entry { /* Pointers to the options tree values. */ @@ -23,6 +24,8 @@ struct bfu_color_entry { /* The copy of "text" and "background" colors. */ struct color_pair colors; + + unsigned int node_number; }; static struct hash *bfu_colors = NULL; @@ -88,6 +91,9 @@ get_bfu_color(struct terminal *term, const char *stylename) entry->foreground = &get_opt_color_tree(opt, "text", NULL); entry->background = &get_opt_color_tree(opt, "background", NULL); + + entry->node_number = ++node_number_counter; + } /* Always update the color pair. */