summaryrefslogtreecommitdiff
path: root/doc/en/weechat_plugin_api.en.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-04-24 22:37:49 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-04-24 22:37:49 +0200
commit112bebcddf99d5187ede8ebbe765abc75373c4f2 (patch)
tree3430bc6a930518eb0fe325c93bd7217d823083c6 /doc/en/weechat_plugin_api.en.adoc
parent0470a71af9e9da57b39702f94705f5f43cec5448 (diff)
downloadweechat-112bebcddf99d5187ede8ebbe765abc75373c4f2.zip
core: add a way to count the suffix length in max chars displayed in cut of string ("cut:" and "cutscr:") (closes #963)
The format to use is one of: - ${cut:+max,suffix,string} - ${cutscr:+max,suffix,string} With the "+" before max, WeeChat ensures there are at most "max" chars in output, including the length of suffix string.
Diffstat (limited to 'doc/en/weechat_plugin_api.en.adoc')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 461655410..2d3091af6 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -2043,19 +2043,27 @@ expanded to last):
`+********+`
| `+${cut:max,suffix,string}+` +
+ `+${cut:+max,suffix,string}+` +
(_WeeChat ≥ 1.8_) |
- String with `max` chars, and optional `suffix` if string is cut. |
+ String with `max` chars, and optional `suffix` if string is cut. +
+ With the format `+max`, the suffix is counted in max length. |
`+${cut:4,…,this is a test}+` +
+ `+${cut:+4,…,this is a test}+` +
`+${cut:2,>>,こんにちは世界}+` |
`+this…+` +
+ `+t…+` +
`+こん>>+`
| `+${cutscr:max,suffix,string}+` +
+ `+${cutscr:+max,suffix,string}+` +
(_WeeChat ≥ 1.8_) |
- String with `max` chars displayed on screen, and optional `suffix` if string is cut. |
+ String with `max` chars displayed on screen, and optional `suffix` if string is cut. +
+ With the format `+max`, the suffix is counted in max length. |
`+${cutscr:4,…,this is a test}+` +
+ `+${cutscr:+4,…,this is a test}+` +
`+${cutscr:2,>>,こんにちは世界}+` |
`+this…+` +
+ `+thi…+` +
`+こ>>+`
| `+${re:N}+` +