diff options
author | Phil Jones <philj56@gmail.com> | 2022-07-27 01:05:27 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-07-27 01:05:27 +0100 |
commit | cf9669976601697be36e21e3359709f09c31d9da (patch) | |
tree | d816141fd992f762e1be854dbdcce623999cd281 | |
parent | bb80769bfdf2efcbf000bf838feaee0c1b31183d (diff) |
Fix drun mode when history is enabled.
-rw-r--r-- | src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1246,6 +1246,14 @@ int main(int argc, char *argv[]) uint32_t selection = tofi.window.entry.selection; char *res = tofi.window.entry.results.buf[selection].string; if (tofi.window.entry.drun) { + /* + * TODO: This is ugly. The list of apps + * needs to be sorted alphabetically + * for bsearch to find the selected + * entry, but we previously sorted by + * history count. This needs fixing. + */ + desktop_vec_sort(&tofi.window.entry.apps); struct desktop_entry *app = desktop_vec_find(&tofi.window.entry.apps, res); if (app == NULL) { log_error("Couldn't find application file! This shouldn't happen.\n"); |