weechat / weechat

The extensible chat client.

Home Page:https://weechat.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the hook_line always print a line even if there is no content

pascalpoitras opened this issue · comments

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

  1. /trigger add test modifier weechat_print "" "/.*//"
  2. /print -core test
  3. /trigger addreplace test line core.weechat "" "/.*//"
  4. /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

Hi,

This is the expected behavior: you must set buffer_name to empty string to remove the line.

The modifier has a different behavior.