summaryrefslogtreecommitdiff
path: root/src/compgen.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-11-19 15:18:40 +0000
committerPhil Jones <philj56@gmail.com>2022-11-19 15:18:40 +0000
commit9ceceeb59a95919e5fe09338dc27e4fac0b5aa24 (patch)
treeadc3f2a822d24420b6b553e98c834257f620ee54 /src/compgen.c
parentd04ca544d6845fc655cd4ba55e134de6bead6a2d (diff)
Sort items in normal tofi mode when using history.
This is a short-term workaround for history sorting not working, due to the binary search used to find exiting items relying on the input already being sorted.
Diffstat (limited to 'src/compgen.c')
-rw-r--r--src/compgen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compgen.c b/src/compgen.c
index b4bcc4c..9e9f422 100644
--- a/src/compgen.c
+++ b/src/compgen.c
@@ -183,6 +183,7 @@ void compgen_history_sort(struct string_vec *programs, struct history *history)
for (size_t i = 0; i < history->count; i++) {
char **res = string_vec_find(programs, history->buf[i].name);
if (res == NULL) {
+ log_debug("History entry \"%s\" not found.\n", history->buf[i].name);
continue;
}
free(*res);