summaryrefslogtreecommitdiff
path: root/tests/unit/gui/test-gui-chat.cpp
AgeCommit message (Collapse)Author
2024-01-01core: update copyright datesSébastien Helleu
2023-12-26core: store microseconds in buffer lines (closes #649)Sébastien Helleu
2023-05-29core: set word_end_offset to character after wordTrygve Aaberge
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.
2023-05-29core: fix chat colors at certain positions not being appliedTrygve Aaberge
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
2023-04-19core: render newline characters in chat line messagesTrygve Aaberge
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.
2023-01-01core: update copyright datesSébastien Helleu
2022-12-10core: do not display non printable chars, fix function utf8_char_size_screenSébastien Helleu
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
2022-01-30core: add support of date and tags in messages displayed in buffers with ↵Sébastien Helleu
free content, add function printf_y_date_tags (closes #1746)
2022-01-30tests: add tests on gui_chat_printf_date_tags with past date and tagsSébastien Helleu
2022-01-29tests: add tests on GUI chat functionsSébastien Helleu
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