summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-05-28 14:56:39 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-25 16:35:27 +0200
commita240115baf365bb29ff51520276d85d3fdf3c557 (patch)
tree36430d52f249dbe641854a3e8e8a1e45ba1d732f /src/plugins
parent83b620e67c801122719a202e8d89ac891b6925b0 (diff)
downloadweechat-a240115baf365bb29ff51520276d85d3fdf3c557.zip
fset: fix size of columns
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/fset/fset-option.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c
index 636e721e6..e0429ffe0 100644
--- a/src/plugins/fset/fset-option.c
+++ b/src/plugins/fset/fset-option.c
@@ -297,52 +297,54 @@ fset_option_set_max_length_fields_option (struct t_fset_option *fset_option)
int length, length_value, length_parent_value;
/* name */
- fset_option_set_max_length_field ("name", strlen (fset_option->name));
+ fset_option_set_max_length_field (
+ "name", weechat_strlen_screen (fset_option->name));
/* parent_name */
fset_option_set_max_length_field (
"parent_name",
- (fset_option->parent_name) ? strlen (fset_option->parent_name) : 0);
+ (fset_option->parent_name) ? weechat_strlen_screen (fset_option->parent_name) : 0);
/* type */
- fset_option_set_max_length_field ("type", strlen (fset_option->type));
+ fset_option_set_max_length_field (
+ "type", weechat_strlen_screen (fset_option->type));
/* default_value */
if (fset_option->default_value)
{
- length = strlen (fset_option->default_value);
+ length = weechat_strlen_screen (fset_option->default_value);
if (strcmp (fset_option->type, "string") == 0)
length += 2;
}
else
{
- length = strlen (FSET_OPTION_VALUE_NULL);
+ length = weechat_strlen_screen (FSET_OPTION_VALUE_NULL);
}
fset_option_set_max_length_field ("default_value", length);
/* value */
if (fset_option->value)
{
- length_value = strlen (fset_option->value);
+ length_value = weechat_strlen_screen (fset_option->value);
if (strcmp (fset_option->type, "string") == 0)
length_value += 2;
}
else
{
- length_value = strlen (FSET_OPTION_VALUE_NULL);
+ length_value = weechat_strlen_screen (FSET_OPTION_VALUE_NULL);
}
fset_option_set_max_length_field ("value", length_value);
/* parent_value */
if (fset_option->parent_value)
{
- length_parent_value = strlen (fset_option->parent_value);
+ length_parent_value = weechat_strlen_screen (fset_option->parent_value);
if (strcmp (fset_option->type, "string") == 0)
length_parent_value += 2;
}
else
{
- length_parent_value = strlen (FSET_OPTION_VALUE_NULL);
+ length_parent_value = weechat_strlen_screen (FSET_OPTION_VALUE_NULL);
}
fset_option_set_max_length_field ("parent_value", length_parent_value);