mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
fix list sorting
This commit is contained in:
parent
cb11364552
commit
9d50f88cef
3 changed files with 22 additions and 14 deletions
|
|
@ -1128,9 +1128,9 @@ static struct cmd_results *cmd_scratchpad(int argc, char **argv) {
|
|||
|
||||
// sort in order of longest->shortest
|
||||
static int compare_set(const void *_l, const void *_r) {
|
||||
struct sway_variable * const *l = _l;
|
||||
struct sway_variable * const *r = _r;
|
||||
return strlen((*r)->name) - strlen((*l)->name);
|
||||
struct sway_variable const *l = _l;
|
||||
struct sway_variable const *r = _r;
|
||||
return strlen(r->name) - strlen(l->name);
|
||||
}
|
||||
|
||||
static struct cmd_results *cmd_set(int argc, char **argv) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue