diff options
author | Phil Jones <philj56@gmail.com> | 2022-11-19 19:28:52 +0000 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-11-19 19:28:52 +0000 |
commit | 5da0579864a13b11bf0808f7f69f7b22f18054b1 (patch) | |
tree | 5e5975cddf5fe2c51d0f4df6b3d55ba7cb6136d3 /src/main.c | |
parent | 52be46abfca9a9b458d7455e891c937437b1356e (diff) |
Fix sorting in normal tofi mode with history.
By using a hash table rather than binary search to find existing items,
we can avoid the need to sort the input.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1351,9 +1351,8 @@ int main(int argc, char *argv[]) if (tofi.history_file[0] == 0) { tofi.use_history = false; } else { - string_vec_sort(&tofi.window.entry.commands); tofi.window.entry.history = history_load(tofi.history_file); - compgen_history_sort(&tofi.window.entry.commands, &tofi.window.entry.history); + string_vec_history_sort(&tofi.window.entry.commands, &tofi.window.entry.history); } } } |