diff options
author | Phil Jones <philj56@gmail.com> | 2022-11-19 19:33:57 +0000 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-11-19 19:33:57 +0000 |
commit | 8ab1b98328d720dec70087f0435210cdd5c67852 (patch) | |
tree | c084a2faf2be548f67450dca5c4d6d92adfee4c1 /src/compgen.c | |
parent | 5da0579864a13b11bf0808f7f69f7b22f18054b1 (diff) |
Make vector finding functions names clearer.
This adds `_sorted` to the names of `string_vec_find` and
`desktop_vec_find`, to make it clear that these functions require their
input to already be sorted.
Also fix a potential bug from not sorting the list of desktops in drun
mode.
Diffstat (limited to 'src/compgen.c')
-rw-r--r-- | src/compgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compgen.c b/src/compgen.c index 8421cec..6cc21a2 100644 --- a/src/compgen.c +++ b/src/compgen.c @@ -181,7 +181,7 @@ void compgen_history_sort(struct string_vec *programs, struct history *history) { log_debug("Moving already known programs to the front.\n"); for (size_t i = 0; i < history->count; i++) { - struct scored_string *res = string_vec_find(programs, history->buf[i].name); + struct scored_string *res = string_vec_find_sorted(programs, history->buf[i].name); if (res == NULL) { log_debug("History entry \"%s\" not found.\n", history->buf[i].name); continue; |