1
0
mirror of https://github.com/irssi/irssi.git synced 2024-07-21 03:14:16 -04:00

add keep_word setting to completion

This commit is contained in:
ailin-nemui 2018-11-25 14:16:08 +01:00
parent 257cb2f5f9
commit 88b1649195

View File

@ -240,6 +240,10 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
/* Remove all nulls (from the signal) before doing further processing */
complist = g_list_remove_all(g_list_first(complist), NULL);
}
if (settings_get_bool("completion_keep_word") && complist != NULL) {
complist = g_list_append(complist, g_strdup(word));
}
}
g_free(linestart);
@ -897,6 +901,7 @@ void completion_init(void)
chat_completion_init();
settings_add_bool("completion", "completion_keep_word", TRUE);
command_bind("completion", NULL, (SIGNAL_FUNC) cmd_completion);
signal_add_first("complete word", (SIGNAL_FUNC) sig_complete_word);