1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 00:33:13 +02:00

Add new option weechat.look.command_chars, add functions string_is_command_char and string_input_for_buffer in plugin and script API

This commit is contained in:
Sebastien Helleu
2010-03-02 17:34:49 +01:00
parent 282f786c1a
commit 0543b0ccc7
35 changed files with 935 additions and 235 deletions
+6 -5
View File
@@ -733,10 +733,10 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
index_result = 0;
/* check if string is a command */
if ((ptr_string[0] == '/') && ptr_string[1] && (ptr_string[1] != '/')
&& (ptr_string[1] != ' '))
if (!weechat_string_input_for_buffer (ptr_string))
{
ptr_string++;
char_size = weechat_utf8_char_size (ptr_string);
ptr_string += char_size;
pos_space = ptr_string;
while (pos_space && pos_space[0] && (pos_space[0] != ' '))
{
@@ -756,10 +756,11 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
free (result);
return NULL;
}
result[index_result++] = '/';
memcpy (result + index_result, aspell_last_modifier_string, char_size);
index_result += char_size;
strcpy (result + index_result, ptr_string);
index_result += strlen (ptr_string);
pos_space[0] = ' ';
ptr_string = pos_space;
}