30 |
#include "weechat.h" |
#include "weechat.h" |
31 |
#include "completion.h" |
#include "completion.h" |
32 |
#include "command.h" |
#include "command.h" |
33 |
|
#include "utf8.h" |
34 |
#include "weelist.h" |
#include "weelist.h" |
35 |
#include "weeconfig.h" |
#include "weeconfig.h" |
36 |
#include "../irc/irc.h" |
#include "../irc/irc.h" |
647 |
completion_stop (completion); |
completion_stop (completion); |
648 |
else |
else |
649 |
{ |
{ |
650 |
string = weechat_convert_encoding (cfg_look_charset_decode, |
string = weechat_convert_encoding ((local_utf8) ? |
651 |
|
cfg_look_charset_decode_iso : cfg_look_charset_decode_utf, |
652 |
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
653 |
cfg_look_charset_internal : local_charset, |
cfg_look_charset_internal : local_charset, |
654 |
((t_irc_channel *)channel)->topic); |
((t_irc_channel *)channel)->topic); |
1002 |
if (completion->word_found) |
if (completion->word_found) |
1003 |
{ |
{ |
1004 |
if (old_word_found) |
if (old_word_found) |
1005 |
|
{ |
1006 |
completion->diff_size = strlen (completion->word_found) - |
completion->diff_size = strlen (completion->word_found) - |
1007 |
strlen (old_word_found); |
strlen (old_word_found); |
1008 |
|
completion->diff_length = utf8_strlen (completion->word_found) - |
1009 |
|
utf8_strlen (old_word_found); |
1010 |
|
} |
1011 |
else |
else |
1012 |
{ |
{ |
1013 |
completion->diff_size = strlen (completion->word_found) - |
completion->diff_size = strlen (completion->word_found) - |
1014 |
strlen (completion->base_word); |
strlen (completion->base_word); |
1015 |
|
completion->diff_length = utf8_strlen (completion->word_found) - |
1016 |
|
utf8_strlen (completion->base_word); |
1017 |
if (completion->context == COMPLETION_COMMAND) |
if (completion->context == COMPLETION_COMMAND) |
1018 |
|
{ |
1019 |
completion->diff_size++; |
completion->diff_size++; |
1020 |
|
completion->diff_length++; |
1021 |
|
} |
1022 |
} |
} |
1023 |
} |
} |
1024 |
} |
} |