You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as answered by @flashcode in the issue #2087, to remove a line in a weechat_print modifier, a simple /.*// is enough, in a hook_line you must remove the buffer from buffer_name.
but when you use hook_line on a free buffer it doesn't behave this way, I mean, all you have to do is a /.*// to remove the line, you don't have to remove the buffer from buffer name.
not sure if this is a bug, I would like to know before pursuing what I'm doing since it change the way I have to implement it
Steps to reproduce
/trigger add test line "*;core.my_buffer_*" "" "/.*test.*//"
/print -switch -newbuffer my_buffer_formatted test
a blank line is there as expected since we didn't touch buffer_name
/print -switch -newbuffer my_buffer_free -free test
no line is printed at all but we didn't touch buffer_name...
proof, print a non test line it will be the first line of the buffer
the behavior is not the one defined by FlashCode in the following issue #2087. So it's either a bug or he forgot to mention that it behave differently in a free buffer
Expected behavior
should print a blank line according to issue #2087
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
The text was updated successfully, but these errors were encountered:
In fact this is normal because of a specificity of free buffers: when you print a line with an empty message, this deletes the line.
If the hook_line is modified to do that, that means deleting a line on free buffer must be done with another way, and this have impact on scripts doing this.
I'm going to document this in the hook_line API function.
Describe the bug
as answered by @flashcode in the issue #2087, to remove a line in a weechat_print modifier, a simple /.*// is enough, in a hook_line you must remove the buffer from buffer_name.
but when you use hook_line on a free buffer it doesn't behave this way, I mean, all you have to do is a /.*// to remove the line, you don't have to remove the buffer from buffer name.
not sure if this is a bug, I would like to know before pursuing what I'm doing since it change the way I have to implement it
Steps to reproduce
/trigger add test line "*;core.my_buffer_*" "" "/.*test.*//"
/print -switch -newbuffer my_buffer_formatted test
/print -switch -newbuffer my_buffer_free -free test
/print -switch -newbuffer my_buffer_free -free hello
Current behavior
the behavior is not the one defined by FlashCode in the following issue #2087. So it's either a bug or he forgot to mention that it behave differently in a free buffer
Expected behavior
should print a blank line according to issue #2087
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
The text was updated successfully, but these errors were encountered: