From a240115baf365bb29ff51520276d85d3fdf3c557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 28 May 2017 14:56:39 +0200 Subject: fset: fix size of columns --- src/plugins/fset/fset-option.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src') 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); -- cgit v1.2.3