diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-10-04 17:26:16 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-10-04 17:26:16 +0200 |
commit | 67726a94514fca53b0a775d294ac4f36c2b10350 (patch) | |
tree | 4590854a31043fedbf0c2bdf644671c17d06cb97 /doc/en | |
parent | 58c32e4249c3c462e8e12ae7d2f428fbf73b5b21 (diff) | |
download | weechat-67726a94514fca53b0a775d294ac4f36c2b10350.zip |
doc: add note about prefix for function weechat_printf in plugin API reference
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index 996305803..d7787efbb 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -5936,12 +5936,20 @@ Arguments: * 'buffer': buffer pointer, if NULL, message is displayed on WeeChat buffer * 'message': message to display +[NOTE] +The first tabulation in message ("\t") is used to separate prefix from message. + +If your message has some tabs and if you don't want prefix, then use a space, +a tab, then message (see example below): this will disable prefix (the space +before tab will not be displayed). + C example: [source,C] ---------------------------------------- weechat_printf (NULL, "Hello on WeeChat buffer"); weechat_printf (buffer, "Hello on this buffer"); +weechat_printf (buffer, "%sThis is an error!", weechat_prefix ("error")); +weechat_printf (buffer, " \tMessage without prefix but with \t some \t tabs"); ---------------------------------------- Script (Python): @@ -5954,6 +5962,8 @@ weechat.prnt(buffer, message) # example weechat.prnt("", "Hello on WeeChat buffer") weechat.prnt(buffer, "Hello on this buffer") +weechat.prnt(buffer, "%sThis is an error!" % weechat.prefix("error")) +weechat.prnt(buffer, " \tMessage without prefix but with \t some \t tabs") ---------------------------------------- [NOTE] |