diff options
Diffstat (limited to 'src/plugins/buflist')
-rw-r--r-- | src/plugins/buflist/buflist-bar-item.c | 5 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-command.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index 4f45592de..38c0a21e7 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -168,6 +168,11 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, goto error; } + /* current buffer */ + weechat_hashtable_set (buflist_hashtable_extra_vars, + "current_buffer", + (current_buffer) ? "1" : "0"); + /* buffer number */ number = weechat_hdata_integer (buflist_hdata_buffer, ptr_buffer, "number"); diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c index 6bfef160b..4a599499e 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -99,6 +99,9 @@ buflist_command_init () "buflist.format.buffer; this can be used in option " "buflist.format.buffer_current to just change the background color " "for example\n" + " - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if " + "this is the current buffer; it can be used in a condition: " + "${if:${current_buffer}?...:...}\n" " - ${format_number}: indented number with separator " "(evaluation of option buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there " |