Age | Commit message (Collapse) | Author |
|
input_multiline is not set in buffer
|
|
Fixes #1913
|
|
If we have chat lines with multiple lines in buffers without
input_multiline set, there can be an issue if a trigger is run on that
line. If the trigger runs a command which includes the message, then the
command is split (since input_multiline isn't set), and if any of the
lines in the message starts with a command, that command is executed.
To prevent this, only avoid splitting on newlines in printf if
input_multiline is set, so only such buffers can have chat lines with
newline characters.
See https://github.com/weechat/weechat/pull/1909 for more details.
|
|
With support for rendering newline characters as new lines, we don't
need to split the message on newline characters anymore in
printf_date_tags. This allows you to print a line with multiple lines.
|
|
If a chat line message contains a newline character (\n) it was
previously rendered as J with reverse video. This commit makes it
render as an actual newline instead, so messages with multiple lines
become supported.
The rendering is fixed in normal mode as well as bare mode both when
scrolled to the bottom and when scrolled up (which is different code
paths). Focus events has also been updated to support this (except for
_chat_line_y which returns -1 for all lines, but the docs says this
variable is only for buffers with free content).
Currently, the only way to include a \n in a chat line message is with
hdata_update because printf splits on \n and creates multiple separate
lines, but hopefully either printf can be changed to not split on \n, or
a new command which doesn't split can be added.
|
|
gui_chat_printf_y_date_tags (closes #1883)
|
|
|
|
add tests on function
|
|
Now the function utf8_char_size_screen can return -1 when the char is not
printable.
It has a specific behavior for some chars:
- U+0009: value of option weechat.look.tab_width
- U+0001 to U+001F (except U+0009): 1
- U+00AD (soft hyphen): -1
- U+200B (zero width space): -1
|
|
hook_hsignal (closes #1780)
|
|
free content, add function printf_y_date_tags (closes #1746)
|
|
Functions moved and renamed:
- gui_chat_build_string_prefix_message -> gui_line_build_string_prefix_message
- gui_chat_build_string_message_tags -> gui_line_build_string_message_tags
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
first buffer is created
|
|
modifier callback (closes #42)
|
|
|
|
|
|
|
|
(closes #1322)
|
|
|
|
|
|
|
|
All changes:
- always send the Tab char in the weechat_print modifier string
- handle special cases in weechat_print modifier: no prefix (" \t...") or no
date ("\t\t...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes two problems:
- stop before max char displayed with wide chars
- preserve combining chars in the output
Before the fix (wrong):
>> ${cutscr:3,+,こんにちは世界}
== [こん+]
>> ${cutscr:1,+,a${\u0308}}
== [a+]
After the fix (OK):
>> ${cutscr:3,+,こんにちは世界}
== [こ+]
>> ${cutscr:1,+,a${\u0308}}
== [ä]
|
|
|
|
|
|
This pointer is the first argument received by callbacks, and the
existing argument "data" is now automatically freed by WeeChat when the
object containing the callback is removed.
With this new pointer, the linked list of callbacks in scripts has been
removed. This will improve speed of scripts (using a lot of hooks),
reduce memory used by scripts and reduce time to unload scripts.
Following functions are affected in the C API:
* exec_on_files
* config_new
* config_new_section
* config_new_option
* hook_command
* hook_command_run
* hook_timer
* hook_fd
* hook_process
* hook_process_hashtable
* hook_connect
* hook_print
* hook_signal
* hook_hsignal
* hook_config
* hook_completion
* hook_modifier
* hook_info
* hook_info_hashtable
* hook_infolist
* hook_hdata
* hook_focus
* unhook_all_plugin
* buffer_new
* bar_item_new
* upgrade_new
* upgrade_read
|
|
|
|
(bug #40985, issue #502)
|
|
gui_chat_string_add_offset and gui_chat_string_add_offset_screen
|
|
and utf8_add_offset
|
|
after use
|
|
to customize quoted messages in cursor mode (closes #403)
|
|
|
|
are displayed in same message (closes #171)
When several lines are displayed in a message (separated by "\n"), the
modifier "weechat_print" will now discard just one line (if return value is
an empty string), instead of discarding the whole message.
|
|
A flag "closing" has been added in buffers. It is set to 1 when the buffer
is closing, and then no more printf is allowed in the buffer (a message
printed on relay buffer was causing a crash when it is closed).
|