mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
fix backward completion
This commit is contained in:
parent
88b1649195
commit
10f41e067e
@ -229,6 +229,7 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
|
|||||||
g_list_first(complist);
|
g_list_first(complist);
|
||||||
want_space = last_want_space;
|
want_space = last_want_space;
|
||||||
} else {
|
} else {
|
||||||
|
int keep_word = settings_get_bool("completion_keep_word");
|
||||||
/* get new completion list */
|
/* get new completion list */
|
||||||
free_completions();
|
free_completions();
|
||||||
|
|
||||||
@ -239,10 +240,17 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i
|
|||||||
if (complist != NULL) {
|
if (complist != NULL) {
|
||||||
/* 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 (keep_word) {
|
||||||
|
complist = g_list_append(complist, g_strdup(word));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings_get_bool("completion_keep_word") && complist != NULL) {
|
if (backward) {
|
||||||
complist = g_list_append(complist, g_strdup(word));
|
complist = g_list_last(complist);
|
||||||
|
if (keep_word) {
|
||||||
|
complist = complist->prev;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user