diff options
author | 2019-12-19 09:22:33 +0000 | |
---|---|---|
committer | 2019-12-19 09:22:33 +0000 | |
commit | 95cd24f8dbded881b37e8ba692d540872d4281ec (patch) | |
tree | 1f3caee76b89a0a66b0df6f3f31be3e26cada972 /usr.bin/tmux/key-bindings.c | |
parent | Use bus_size_t as the type for the base address. (diff) | |
download | wireguard-openbsd-95cd24f8dbded881b37e8ba692d540872d4281ec.tar.xz wireguard-openbsd-95cd24f8dbded881b37e8ba692d540872d4281ec.zip |
When adding a list with multiple commands to the queue, the next item to
insert after needs to be the last one added, not the first. Reported by
Jason Kim in GitHub issue 2023.
Diffstat (limited to 'usr.bin/tmux/key-bindings.c')
-rw-r--r-- | usr.bin/tmux/key-bindings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c index b7f6a129cbb..9e89186cf9c 100644 --- a/usr.bin/tmux/key-bindings.c +++ b/usr.bin/tmux/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.104 2019/12/02 19:25:52 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.105 2019/12/19 09:22:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -520,8 +520,8 @@ key_bindings_dispatch(struct key_binding *bd, struct cmdq_item *item, new_item->shared->flags |= CMDQ_SHARED_REPEAT; } if (item != NULL) - cmdq_insert_after(item, new_item); + new_item = cmdq_insert_after(item, new_item); else - cmdq_append(c, new_item); + new_item = cmdq_append(c, new_item); return (new_item); } |