mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 21:36:21 +00:00
Remove fields from command autocomplete on form submit/cancel
This commit is contained in:
@@ -2060,6 +2060,10 @@ cmd_form(gchar **args, struct cmd_help_t help)
|
|||||||
|
|
||||||
if ((g_strcmp0(args[0], "submit") == 0) ||
|
if ((g_strcmp0(args[0], "submit") == 0) ||
|
||||||
(g_strcmp0(args[0], "cancel") == 0)) {
|
(g_strcmp0(args[0], "cancel") == 0)) {
|
||||||
|
if (current->form) {
|
||||||
|
cmd_autocomplete_remove_form_fields(current->form);
|
||||||
|
}
|
||||||
|
|
||||||
wins_close_current();
|
wins_close_current();
|
||||||
current = wins_get_by_recipient(room);
|
current = wins_get_by_recipient(room);
|
||||||
if (current == NULL) {
|
if (current == NULL) {
|
||||||
|
|||||||
@@ -1013,6 +1013,13 @@ _ui_close_current(void)
|
|||||||
static void
|
static void
|
||||||
_ui_close_win(int index)
|
_ui_close_win(int index)
|
||||||
{
|
{
|
||||||
|
ProfWin *window = wins_get_by_num(index);
|
||||||
|
if (window) {
|
||||||
|
if (window->type == WIN_MUC_CONFIG && window->form) {
|
||||||
|
cmd_autocomplete_remove_form_fields(window->form);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wins_close_by_num(index);
|
wins_close_by_num(index);
|
||||||
title_bar_console();
|
title_bar_console();
|
||||||
status_bar_current(1);
|
status_bar_current(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user