mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
xep-0308: Fix sending corrections for multiple words
This commit is contained in:
parent
bc571a387d
commit
1072cdab0a
@ -3765,8 +3765,9 @@ _correct_autocomplete(ProfWin *window, const char *const input, gboolean previou
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GString *result_str = g_string_new("/correct ");
|
GString *result_str = g_string_new("/correct \"");
|
||||||
g_string_append(result_str, last_message);
|
g_string_append(result_str, last_message);
|
||||||
|
g_string_append(result_str, "\"");
|
||||||
char *result = result_str->str;
|
char *result = result_str->str;
|
||||||
g_string_free(result_str, FALSE);
|
g_string_free(result_str, FALSE);
|
||||||
|
|
||||||
|
@ -2393,8 +2393,10 @@ static struct cmd_t command_defs[] =
|
|||||||
CMD_DESC(
|
CMD_DESC(
|
||||||
"Correct and resend the last message (XEP-0308).")
|
"Correct and resend the last message (XEP-0308).")
|
||||||
CMD_ARGS(
|
CMD_ARGS(
|
||||||
{ "<message>", "The corrected message."})
|
{ "\"message\"", "The corrected message. Multiple words need quotation marks."})
|
||||||
CMD_NOEXAMPLES
|
CMD_EXAMPLES(
|
||||||
|
"/correct Profanity",
|
||||||
|
"/correct \"Profanity is the best\"")
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ typedef struct cmd_help_t {
|
|||||||
* cmd - The command string including leading '/'
|
* cmd - The command string including leading '/'
|
||||||
* parser - The function used to parse arguments
|
* parser - The function used to parse arguments
|
||||||
* min_args - Minimum number of arguments
|
* min_args - Minimum number of arguments
|
||||||
* max_args - Maximum number of arguments
|
* max_args - Maximum number of arguments, -1 for infinite
|
||||||
* setting_func - Function to display current settings to the console
|
* setting_func - Function to display current settings to the console
|
||||||
* sub_funcs - Optional list of functions mapped to the first argument
|
* sub_funcs - Optional list of functions mapped to the first argument
|
||||||
* func - Main function to call when no arguments, or sub_funcs not implemented
|
* func - Main function to call when no arguments, or sub_funcs not implemented
|
||||||
|
Loading…
Reference in New Issue
Block a user