1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +02:00

buflist: add variable ${current_buffer} in bar item evaluation

This commit is contained in:
Sébastien Helleu
2017-05-19 07:39:23 +02:00
parent 138af6e7dd
commit b522060cef
22 changed files with 74 additions and 14 deletions
+5
View File
@@ -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");
+3
View File
@@ -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 "