mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 05:16:38 +02:00
core: count number of chars instead of bytes for suffix in function string_cut
This commit is contained in:
@@ -36,6 +36,7 @@ New features::
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: count number of chars instead of bytes for suffix in function string_cut
|
||||
* core: fix delete of previous/next word (keys kbd:[Ctrl+w] and kbd:[Alt+d]) (issue #1195)
|
||||
* core: fix infinite loop in evaluation of strings (issue #1183)
|
||||
* core: change default value of option weechat.look.window_title from "WeeChat ${info:version}" to empty string (issue #1182)
|
||||
|
||||
@@ -134,7 +134,7 @@ string_cut (const char *string, int length, int count_suffix, int screen,
|
||||
if (screen)
|
||||
length -= utf8_strlen_screen (cut_suffix);
|
||||
else
|
||||
length -= length_cut_suffix;
|
||||
length -= utf8_strlen (cut_suffix);
|
||||
if (length < 0)
|
||||
return strdup ("");
|
||||
if (screen)
|
||||
|
||||
@@ -296,7 +296,7 @@ TEST(Eval, EvalExpression)
|
||||
WEE_CHECK_EVAL("tes…", "${cutscr:3,…,test}");
|
||||
WEE_CHECK_EVAL("te+", "${cut:+3,+,test}");
|
||||
WEE_CHECK_EVAL("te+", "${cutscr:+3,+,test}");
|
||||
WEE_CHECK_EVAL("…", "${cut:+3,…,test}");
|
||||
WEE_CHECK_EVAL("te…", "${cut:+3,…,test}");
|
||||
WEE_CHECK_EVAL("te…", "${cutscr:+3,…,test}");
|
||||
WEE_CHECK_EVAL("t++", "${cut:+3,++,test}");
|
||||
WEE_CHECK_EVAL("t++", "${cutscr:+3,++,test}");
|
||||
|
||||
Reference in New Issue
Block a user