Age | Commit message (Collapse) | Author |
|
|
|
|
|
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
|
|
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.
|
|
|
|
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
|
|
free content, add function printf_y_date_tags (closes #1746)
|
|
|
|
Functions tested:
- gui_chat_utf_char_valid
- gui_chat_char_size_screen
- gui_chat_strlen
- gui_chat_strlen_screen
- gui_chat_string_add_offset
- gui_chat_string_add_offset_screen
- gui_chat_string_real_pos
- gui_chat_string_pos
- gui_chat_get_word_info
- gui_chat_printf_date_tags_internal
- gui_chat_printf_date_tags
- gui_chat_printf_y
|