mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Leave command list order from .cwmrc alone; remove sort.
This commit is contained in:
parent
871c9f24ba
commit
a79253abdc
9
conf.c
9
conf.c
@ -40,7 +40,7 @@ static void conf_unbind_mouse(struct conf *, struct binding *);
|
|||||||
int
|
int
|
||||||
conf_cmd_add(struct conf *c, const char *name, const char *path)
|
conf_cmd_add(struct conf *c, const char *name, const char *path)
|
||||||
{
|
{
|
||||||
struct cmd *cmd, *prev;
|
struct cmd *cmd;
|
||||||
|
|
||||||
cmd = xmalloc(sizeof(*cmd));
|
cmd = xmalloc(sizeof(*cmd));
|
||||||
|
|
||||||
@ -55,13 +55,6 @@ conf_cmd_add(struct conf *c, const char *name, const char *path)
|
|||||||
|
|
||||||
TAILQ_INSERT_TAIL(&c->cmdq, cmd, entry);
|
TAILQ_INSERT_TAIL(&c->cmdq, cmd, entry);
|
||||||
|
|
||||||
/* keep queue sorted by name */
|
|
||||||
while ((prev = TAILQ_PREV(cmd, cmd_q, entry)) &&
|
|
||||||
(strcmp(prev->name, cmd->name) > 0)) {
|
|
||||||
TAILQ_REMOVE(&c->cmdq, cmd, entry);
|
|
||||||
TAILQ_INSERT_BEFORE(prev, cmd, entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user