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:
@@ -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");
|
||||
|
||||
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user