the hook_line always print a line even if there is no content
pascalpoitras opened this issue · comments
Pascal Poitras Dubois commented
Describe the bug
the weechat_print modifier act as I expect, if you replace the string by nothing, no line is printed. However the hook_line doesn't work like that, it print a line with nothing. If this is the normal behavior can I have an explanation why it works like that?
Steps to reproduce
- /trigger add test modifier weechat_print "" "/.*//"
- /print -core test
- /trigger addreplace test line core.weechat "" "/.*//"
- /print -core test
Current behavior
for the weechat_print modifier, no line is printed, for the hook line a line is printed
Expected behavior
I expected the hook line to do the same as the weechat_print modifier
Suggested solutions
No response
Additional information
No response
WeeChat version
4.3.0
What OS are you using?
Debian 12
On which terminal are you running WeeChat?
No response
Which terminal multiplexer are you using?
No response
Sébastien Helleu commented
Hi,
This is the expected behavior: you must set buffer_name
to empty string to remove the line.
The modifier has a different behavior.