mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
add keep_word setting to completion
This commit is contained in:
parent
257cb2f5f9
commit
88b1649195
@ -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 */
|
/* Remove all nulls (from the signal) before doing further processing */
|
||||||
complist = g_list_remove_all(g_list_first(complist), NULL);
|
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);
|
g_free(linestart);
|
||||||
@ -897,6 +901,7 @@ void completion_init(void)
|
|||||||
|
|
||||||
chat_completion_init();
|
chat_completion_init();
|
||||||
|
|
||||||
|
settings_add_bool("completion", "completion_keep_word", TRUE);
|
||||||
command_bind("completion", NULL, (SIGNAL_FUNC) cmd_completion);
|
command_bind("completion", NULL, (SIGNAL_FUNC) cmd_completion);
|
||||||
|
|
||||||
signal_add_first("complete word", (SIGNAL_FUNC) sig_complete_word);
|
signal_add_first("complete word", (SIGNAL_FUNC) sig_complete_word);
|
||||||
|
Loading…
Reference in New Issue
Block a user