aboutsummaryrefslogtreecommitdiff
path: root/url-mode.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-07-29 09:18:49 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-07-29 09:18:49 +0000
commit83303bd2a461b5917de51d8740999cbdb46e7986 (patch)
tree32bc243ebcb375c07ae72ba4a0402de44e1a8f8d /url-mode.c
parentAdd tinted variant of modus-vivendi theme (diff)
url-mode: for some reason we sorted the label letters before assigning them
Don't do this. Now that we **don't** sort them, the first letter chosen by the user is always assigned to the bottom most URL. Closes #2140 (again)
Diffstat (limited to 'url-mode.c')
-rw-r--r--url-mode.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/url-mode.c b/url-mode.c
index c25396cd..19d95356 100644
--- a/url-mode.c
+++ b/url-mode.c
@@ -557,14 +557,6 @@ urls_collect(const struct terminal *term, enum url_action action,
remove_overlapping(urls, term->grid->num_cols);
}
-static int
-c32cmp_qsort_wrapper(const void *_a, const void *_b)
-{
- const char32_t *a = *(const char32_t **)_a;
- const char32_t *b = *(const char32_t **)_b;
- return c32cmp(a, b);
-}
-
static void
generate_key_combos(const struct config *conf,
size_t count, char32_t *combos[static count])
@@ -607,10 +599,6 @@ generate_key_combos(const struct config *conf,
}
free(hints);
- /* Sorting is a kind of shuffle, since we're sorting on the
- * *reversed* strings */
- qsort(combos, count, sizeof(char32_t *), &c32cmp_qsort_wrapper);
-
/* Reverse all strings */
for (size_t i = 0; i < count; i++) {
const size_t len = c32len(combos[i]);