1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 05:46:38 +02:00

trigger: display failing regex in trigger creation error

This commit is contained in:
Sébastien Helleu
2022-11-06 09:13:02 +01:00
parent f18b96bb59
commit 55b5549054
15 changed files with 146 additions and 63 deletions
+10 -6
View File
@@ -587,24 +587,28 @@ trigger_command_trigger (const void *pointer, void *data,
case -1: /* format error */
weechat_printf (NULL,
_("%s%s: invalid format for regular "
"expression"),
"expression: \"%s\""),
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME);
TRIGGER_PLUGIN_NAME,
sargv[4]);
goto end;
break;
case -2: /* regex compilation error */
weechat_printf (NULL,
_("%s%s: invalid regular expression "
"(compilation failed)"),
"(compilation failed): \"%s\""),
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME);
TRIGGER_PLUGIN_NAME,
sargv[4]);
goto end;
break;
case -3: /* memory error */
weechat_printf (NULL,
_("%s%s: not enough memory"),
_("%s%s: not enough memory for regular "
"expression: \"%s\""),
weechat_prefix ("error"),
TRIGGER_PLUGIN_NAME);
TRIGGER_PLUGIN_NAME,
sargv[4]);
goto end;
break;
}