From 4bc445f080ff53268ff1af26564d19c35c17e980 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 18 Nov 2019 09:42:09 +0000 Subject: [PATCH 1/2] Keep modifiers on backspace when translating it. --- input-keys.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/input-keys.c b/input-keys.c index 1325e813..01f9ad9d 100644 --- a/input-keys.c +++ b/input-keys.c @@ -157,7 +157,7 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m) u_int i; size_t dlen; char *out; - key_code justkey; + key_code justkey, newkey; struct utf8_data ud; log_debug("writing key 0x%llx (%s) to %%%u", key, @@ -179,9 +179,10 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m) /* Is this backspace? */ if ((key & KEYC_MASK_KEY) == KEYC_BSPACE) { - key = options_get_number(global_options, "backspace"); - if (key >= 0x7f) - key = '\177'; + newkey = options_get_number(global_options, "backspace"); + if (newkey >= 0x7f) + newkey = '\177'; + key = newkey|(key & KEYC_MASK_MOD); } /* From 350a43493952e1f10173b4e341ff1fbd8ed8440d Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 18 Nov 2019 09:43:31 +0000 Subject: [PATCH 2/2] Add -f for full size to join-pane (like split-window), from Theo Buehler. --- cmd-join-pane.c | 13 ++++++++----- tmux.1 | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd-join-pane.c b/cmd-join-pane.c index b6eff0fe..5344f3ec 100644 --- a/cmd-join-pane.c +++ b/cmd-join-pane.c @@ -36,8 +36,8 @@ const struct cmd_entry cmd_join_pane_entry = { .name = "join-pane", .alias = "joinp", - .args = { "bdhvp:l:s:t:", 0, 0 }, - .usage = "[-bdhv] [-l size] " CMD_SRCDST_PANE_USAGE, + .args = { "bdfhvp:l:s:t:", 0, 0 }, + .usage = "[-bdfhv] [-l size] " CMD_SRCDST_PANE_USAGE, .source = { 's', CMD_FIND_PANE, CMD_FIND_DEFAULT_MARKED }, .target = { 't', CMD_FIND_PANE, 0 }, @@ -143,10 +143,13 @@ cmd_join_pane_exec(struct cmd *self, struct cmdq_item *item) else size = (dst_wp->sx * percentage) / 100; } + + flags = 0; if (args_has(args, 'b')) - flags = SPAWN_BEFORE; - else - flags = 0; + flags |= SPAWN_BEFORE; + if (args_has(args, 'f')) + flags |= SPAWN_FULLSIZE; + lc = layout_split_pane(dst_wp, type, size, flags); if (lc == NULL) { cmdq_error(item, "create pane failed: pane too small"); diff --git a/tmux.1 b/tmux.1 index e617ec61..3649e0f6 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1890,7 +1890,7 @@ zooms the pane. .Pp This command works only if at least one client is attached. .It Xo Ic join-pane -.Op Fl bdhv +.Op Fl bdfhv .Op Fl l Ar size .Op Fl s Ar src-pane .Op Fl t Ar dst-pane