summaryrefslogtreecommitdiff
path: root/src/gui/gui-chat.c
AgeCommit message (Collapse)Author
2023-05-01core: keep only first message line in modifier "weechat_print" when ↵Sébastien Helleu
input_multiline is not set in buffer
2023-04-25core: add cursor key l to quote focused lineTrygve Aaberge
Fixes #1913
2023-04-19core: still split on printf when input_multiline isn't setTrygve Aaberge
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.
2023-04-19core: don't split on newline characters in printf_date_tagsTrygve Aaberge
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.
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-02-22core: fix crash in case of NULL message sent to function ↵Sébastien Helleu
gui_chat_printf_y_date_tags (closes #1883)
2023-01-01core: update copyright datesSébastien Helleu
2022-12-18core: remove unused argument "pos" from function gui_input_insert_string, ↵Sébastien Helleu
add tests on function
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-04-24api: allow to catch multiple signals in functions hook_signal and ↵Sébastien Helleu
hook_hsignal (closes #1780)
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-28core: move functions from gui-chat.c to gui-line.cSébastien Helleu
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
2022-01-28core: use dynamic string in function gui_chat_build_string_message_tagsSébastien Helleu
2022-01-28core: use dynamic string in function gui_chat_build_string_prefix_messageSébastien Helleu
2022-01-26core: check that utf_char is not NULL in gui chat functionsSébastien Helleu
2022-01-26core: fix memory leak when removing a line on a buffer with free contentSébastien Helleu
2022-01-17core: update copyright datesSébastien Helleu
2021-01-02core: update copyright datesSébastien Helleu
2020-08-23api: add argument "bytes" in function string_dyn_concatSébastien Helleu
2020-05-10core: don't collapse consecutive newlines in lines displayed before the ↵Sébastien Helleu
first buffer is created
2020-05-09api: use buffer pointer in argument "modifier_data" sent to weechat_print ↵Sébastien Helleu
modifier callback (closes #42)
2020-01-04core: update copyright datesSébastien Helleu
2019-09-21core: ignore color codes in ${length:xxx} and ${lengthscr:xxx}Sébastien Helleu
2019-06-15api: add argument "strip_items" in function string_splitSébastien Helleu
2019-03-10core: replace argument "keep_eol" by "flags" in function string_split ↵Sébastien Helleu
(closes #1322)
2019-01-01core: update copyright datesSébastien Helleu
2018-11-29core: use https for links to GNU GPL licenseSébastien Helleu
2018-10-01core: replace "long unsigned int" by "unsigned long"Sébastien Helleu
2018-08-16core: fix weechat_print modifierSébastien Helleu
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...")
2018-08-15core: remove use of pointer "buffer" once the line has been initializedSébastien Helleu
2018-08-15core: add comments in function to print a lineSébastien Helleu
2018-08-15core: fix destruction of line prefix in weechat_print modifierSébastien Helleu
2018-08-15core: fix comparison of strings in weechat_print modifierSébastien Helleu
2018-08-12api: add function hook_lineSébastien Helleu
2018-01-07core: fix some stylesSébastien Helleu
2018-01-05core: update copyright datesSébastien Helleu
2017-09-23core, plugins: check return code of strftime functionSébastien Helleu
2017-03-28core: fix cut of chars in "cutscr" of evaluated stringsSébastien Helleu
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}} == [ä]
2017-01-01core: update copyright datesSébastien Helleu
2016-07-09core: rename function string_iconv_fprintf to string_fprintfSébastien Helleu
2016-03-21core: add pointer in some callbacks (closes #406)Sébastien Helleu
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
2016-01-01core: update copyright datesSébastien Helleu
2015-08-23core: fix truncated messages after a word with a length of zero on screen ↵Sébastien Helleu
(bug #40985, issue #502)
2015-07-04core: fix type of value returned by functions gui_chat_string_next_char, ↵Sébastien Helleu
gui_chat_string_add_offset and gui_chat_string_add_offset_screen
2015-07-04api: fix type of value returned by functions utf8_prev_char, utf8_next_char ↵Sébastien Helleu
and utf8_add_offset
2015-07-04core: add missing comments before functions when the result must be freed ↵Sébastien Helleu
after use
2015-04-19core: add options weechat.look.quote_{nick_prefix|nick_suffix|time_format} ↵Sébastien Helleu
to customize quoted messages in cursor mode (closes #403)
2015-01-01core: update copyright datesSébastien Helleu
2014-08-19core: fix modifier "weechat_print": discard only one line when several lines ↵Sébastien Helleu
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.
2014-05-24relay: fix crash when closing relay buffers (closes #57, closes #78)Sébastien Helleu
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).