Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This is not strictly necessary, just in case the function strtol() doesn't
update the pointer.
|
|
gui_chat_printf_date_tags_internal
|
|
The variable `pos_end` is never used when not initialized anyway, thanks to the
`break` done before.
|
|
It seemed strange to me to have word_end_offset point to the last
character in the word, rather than the character after the word,
especially now with the word stopping before a newline character which
meant word_end_offset would be -1 if there was no characters before the
newline character.
|
|
The new rendering of multiline lines had some issues with colors at
certain positions not being applied. The color would not be applied if
the color code was at either of these positions:
- At the start of a line after a newline character
- At the end of a line after a space and before a newline character
- At a line by itself before a newline character
The way I had done it by considering newline characters as a word in
gui_chat_get_word_info with a variable specifying that it's newline
characters became messy and didn't really make sense, so rather than
doing this, I changed gui_chat_get_word_info to stop before the first
newline character. That way, we can just check if we are at a newline
character at the start of the loop, and don't need any more special
handling.
Fixes #1928
|
|
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
|
|
|