1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

fset: fix cursor position when appending to an option with NULL value

This commit is contained in:
Sébastien Helleu
2017-06-13 21:09:18 +02:00
parent b879df09b5
commit cb929bcac1
+2 -3
View File
@@ -1067,9 +1067,8 @@ fset_option_set (struct t_fset_option *fset_option,
5 + /* "/set " */
weechat_utf8_strlen (fset_option->name) + 1 +
((add_quotes) ? 1 : 0) +
((append) ? weechat_utf8_strlen (
(fset_option->value) ?
fset_option->value : FSET_OPTION_VALUE_NULL) : 0);
((append) ? ((fset_option->value) ?
weechat_utf8_strlen (fset_option->value) : 0) : 0);
snprintf (str_pos, sizeof (str_pos), "%d", input_pos);
weechat_buffer_set (buffer, "input_pos", str_pos);
}