/[weechat]/weechat/src/common/completion.c
ViewVC logotype

Diff of /weechat/src/common/completion.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by flashcode, Sat Oct 15 12:34:21 2005 UTC revision 1.31 by flashcode, Fri Oct 21 13:59:55 2005 UTC
# Line 30  Line 30 
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"
# Line 646  completion_build_list (t_completion *com Line 647  completion_build_list (t_completion *com
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);
# Line 1000  completion_search (t_completion *complet Line 1002  completion_search (t_completion *complet
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  }  }

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26