Sébastien Helleu
d8c954472c
irc: fix integer overflow in loops (issue #2178 )
2024-09-08 09:09:53 +02:00
Sébastien Helleu
64eee892b2
core: fix integer overflow in loops (issue #2178 )
2024-09-08 09:09:53 +02:00
Yiheng Cao
d1655945cd
core: fix integer overflow in string_free_split functions (issue #2178 )
2024-09-08 08:29:47 +02:00
Sébastien Helleu
3778ef0636
core: fix Curl version in comments
2023-01-04 22:23:33 +01:00
Sébastien Helleu
0ce0fa9f1f
api: add Curl options for versions 7.64.0 to 7.87.0
2023-01-03 23:21:44 +01:00
Sébastien Helleu
7526776f4e
plugins: change priority of scripting plugins
...
Use a step of 10 between each scripting plugin priority.
2023-01-03 20:20:21 +01:00
Sébastien Helleu
958f39cb95
core: fix crash or infinite loop in /allbuf command
...
A crash could occur if the command closes buffers.
An infinite loop could occur if the command creates new buffers.
2023-01-03 17:02:38 +01:00
Sébastien Helleu
189eb5dc40
core: add variable list_size to prevent computing arraylist size in each iteration
2023-01-03 17:01:52 +01:00
Sébastien Helleu
9ee0955d6b
irc: properly rename private buffer on notice messages
2023-01-03 01:06:51 +01:00
Sébastien Helleu
7baef6396d
irc: properly rename private buffer on nick changes or private message when new nick is the same with different case
2023-01-02 14:17:20 +01:00
Sébastien Helleu
c739026c87
irc: replace "private window" by "private buffer" in comments
2023-01-02 13:50:58 +01:00
Sébastien Helleu
33bba784c3
core: update copyright dates
2023-01-01 14:54:35 +01:00
Sébastien Helleu
727c465911
core: check that buffer is not NULL in function gui_input_clipboard_copy
2023-01-01 14:39:38 +01:00
Sébastien Helleu
73bac5491b
core: move function gui_input_move_to_buffer to gui-buffer.c
2022-12-31 10:40:00 +01:00
Sébastien Helleu
05839983d4
core: fix color when the delimiter is not followed by a background color ( closes #1867 )
2022-12-30 21:50:18 +01:00
Sébastien Helleu
fce2fcba4f
core: add option weechat.look.chat_space_right (issue #1862 )
2022-12-29 12:00:28 +01:00
Sébastien Helleu
45638dca23
core: allow value "0" in buffer property "unread" to remove read marker from buffer
2022-12-26 01:27:45 +01:00
Sébastien Helleu
41fd26fe79
core: move /input buffer switch/zoom actions to command /buffer
...
Actions moved:
* `/input switch_active_buffer` -> `/buffer switch`
* `/input switch_active_buffer_previous` -> `/buffer switch -previous`
* `/input zoom_merged_buffer` -> `/buffer zoom`
2022-12-25 22:47:18 +01:00
Sébastien Helleu
0c29d4c5b6
core: move /input set_unread actions to commands /allbuf and /buffer set
...
Actions moved:
* `/input set_unread` -> `/allbuf /buffer set unread`
* `/input set_unread_current_buffer` -> `/buffer set unread`
2022-12-25 21:44:27 +01:00
Sébastien Helleu
2c238e08ff
core: add command /allbuf
2022-12-25 21:23:14 +01:00
Sébastien Helleu
2ad6f2f3d5
api: do not check hotlist add conditions when adding buffer in hotlist with function buffer_set
2022-12-25 20:35:10 +01:00
Sébastien Helleu
a9094fd2fa
core: add option add in command /hotlist
2022-12-25 19:40:57 +01:00
Sébastien Helleu
b3e4a91760
core: fix typo in comment
2022-12-25 19:07:39 +01:00
Sébastien Helleu
babe1e7a42
core: move /input hotlist actions to new command /hotlist
...
Actions moved to command `/hotlist`:
* `/input hotlist_clear` -> `/hotlist clear`
* `/input hotlist_remove_buffer` -> `/hotlist remove`
* `/input hotlist_restore_buffer` -> `/hotlist restore`
* `/input hotlist_restore_all` -> `/hotlist restore -all`
2022-12-25 18:50:57 +01:00
Sébastien Helleu
574a4c8834
core: add function gui_buffer_jump_last_visible_number
2022-12-25 17:57:59 +01:00
Sébastien Helleu
c9796a3141
core: move /input jump actions to command /buffer jump
...
Actions moved to command `/buffer jump`:
* `/input jump_smart` -> `/buffer jump smart`
* `/input jump_previously_visited_buffer` -> `/buffer jump prev_visited`
* `/input jump_next_visited_buffer` -> `/buffer jump next_visited`
* `/input jump_last_buffer_displayed` -> `/buffer jump last_displayed`
2022-12-25 17:00:37 +01:00
Sébastien Helleu
445b522498
core: fix typo in comment
2022-12-25 15:06:03 +01:00
Sébastien Helleu
f5135277af
core: remove useless conditions
2022-12-24 19:40:53 +01:00
Sébastien Helleu
21f3575016
api: add functions string_strcmp and string_strncmp
2022-12-24 18:29:35 +01:00
Sébastien Helleu
0dd1d4133b
doc/api: mention "UTF-8" in char/string comparison functions
2022-12-24 17:52:31 +01:00
Sébastien Helleu
a67556907d
api: rename char comparison functions "utf8_char*" to "string_char*"
2022-12-24 17:33:22 +01:00
Sébastien Helleu
083032972d
api: return arithmetic difference between chars in string comparison functions
...
Return code is changed for the following functions:
- string_strcasecmp
- string_strcasecmp_range
- string_strncasecmp
- string_strncasecmp_range
- string_strcmp_ignore_chars
- utf8_charcmp
- utf8_charcasecmp
- utf8_charcasecmp_range
2022-12-24 16:25:20 +01:00
Sébastien Helleu
5fc656a1b8
api: fix function strcmp_ignore_chars with case sensitive comparison and wide chars starting with the same byte
2022-12-23 23:20:29 +01:00
Sébastien Helleu
68b510517e
core: improve case convert and insensitive char comparisons ( closes #258 )
...
All lowercase letters are now properly converted to uppercase letters (and vice
versa), via functions `towupper` and `towlower`.
Functions `string_tolower`, `string_toupper` and `utf8_charcasecmp` have been
optimized to be faster when there are ASCII chars (< 128); functions are about
25-40% faster with mixed chars (both ASCII and multi-bytes).
Function `utf8_wide_char` has been removed, `utf8_char_int` can be used
instead.
2022-12-21 20:49:09 +01:00
Sébastien Helleu
95286c1eb3
core: remove unneeded casts
2022-12-19 13:01:33 +01:00
Sébastien Helleu
267313304e
irc: fix calls to weechat_string_toupper
2022-12-19 11:18:59 +01:00
Sébastien Helleu
33b6adc3d3
core: fix call to string_toupper
2022-12-19 11:18:49 +01:00
Sébastien Helleu
56436e57fd
spell: return directly output of string_dyn_free without temporary variable
2022-12-19 07:07:12 +01:00
Sébastien Helleu
5df4126c75
irc: return directly output of string_dyn_free without temporary variable
2022-12-19 07:06:01 +01:00
Sébastien Helleu
42113ebc0f
core: return directly output of string_dyn_free without temporary variable
2022-12-19 07:04:33 +01:00
Sébastien Helleu
40339b288a
api: return newly allocated string in functions string_tolower and string_toupper
2022-12-18 14:28:58 +01:00
Sébastien Helleu
eb6cc0bc2a
core: return number of bytes for UTF-8 char in function utf8_int_string
2022-12-18 14:13:14 +01:00
Sébastien Helleu
dd9ae79204
core: remove unused argument "pos" from function gui_input_insert_string, add tests on function
2022-12-18 14:13:14 +01:00
Sébastien Helleu
f03384d124
core: simplify gui input functions by returning immediately if condition not met
2022-12-17 22:22:15 +01:00
Sébastien Helleu
fb31cf663e
irc: do not join channels in server autojoin option after reconnection to the server ( closes #560 , bug #21529 )
2022-12-17 12:55:39 +01:00
Trygve Aaberge
dc8a35796a
doc/api: Improve python example for config_new_section
...
This updates the Python examples to include all the possible return
values for the callbacks in config_new_section, like it is done in the C
example. It also aligns the order of the values with the C example.
2022-12-11 15:33:11 +01:00
Trygve Aaberge
ebc63d1b83
scripts: Send null values to config section callbacks
...
The callback_read and callback_create_option functions in the scripting
APIs always get the value as a string, never as null. This means that if
the value is null, there is no way for the script to distinguish this
from an empty string for string options. This makes it impossible to
properly make options with fallback values, like the irc server and
server_default options, as far as I can see.
All the scripting languages except Tcl use that language's equivalent
for null. For JavaScript which has both null and undefined, null is
used. For Tcl, the magic null string defined in commit 197a7a01e is used
and the documentation is updated to describe that.
I tested this with these scripts:
https://gist.github.com/trygveaa/2d49c609addf9773d2ed16e15d1e3447
You can load all of those scripts and see the result with this command
(assuming you have the scripts in the current directory):
weechat -t -r "/filter add script * * script; /script load $(echo script_config.*)"
2022-12-11 15:13:31 +01:00
Sébastien Helleu
1bfc8b9cf8
trigger: fix variables sent to focus callback ( closes #1858 )
...
This fixes a regression introduced in WeeChat 3.7 by commit
0f67f55098 .
2022-12-10 22:30:24 +01:00
Sébastien Helleu
18c9ade580
core: add whole string information in /debug unicode
2022-12-10 17:32:09 +01:00
Sébastien Helleu
5b9b1e175b
core: add color attributes "blink" and "dim" (half bright) ( closes #1855 )
2022-12-10 16:37:03 +01:00