Merge branch 'obsd-master'

pull/1982/head
Thomas Adam 2019-11-18 10:01:25 +00:00
commit 0d3f306c8e
3 changed files with 14 additions and 10 deletions

View File

@ -35,8 +35,8 @@ const struct cmd_entry cmd_join_pane_entry = {
.name = "join-pane", .name = "join-pane",
.alias = "joinp", .alias = "joinp",
.args = { "bdhvp:l:s:t:", 0, 0 }, .args = { "bdfhvp:l:s:t:", 0, 0 },
.usage = "[-bdhv] [-l size] " CMD_SRCDST_PANE_USAGE, .usage = "[-bdfhv] [-l size] " CMD_SRCDST_PANE_USAGE,
.source = { 's', CMD_FIND_PANE, CMD_FIND_DEFAULT_MARKED }, .source = { 's', CMD_FIND_PANE, CMD_FIND_DEFAULT_MARKED },
.target = { 't', CMD_FIND_PANE, 0 }, .target = { 't', CMD_FIND_PANE, 0 },
@ -142,10 +142,13 @@ cmd_join_pane_exec(struct cmd *self, struct cmdq_item *item)
else else
size = (dst_wp->sx * percentage) / 100; size = (dst_wp->sx * percentage) / 100;
} }
flags = 0;
if (args_has(args, 'b')) if (args_has(args, 'b'))
flags = SPAWN_BEFORE; flags |= SPAWN_BEFORE;
else if (args_has(args, 'f'))
flags = 0; flags |= SPAWN_FULLSIZE;
lc = layout_split_pane(dst_wp, type, size, flags); lc = layout_split_pane(dst_wp, type, size, flags);
if (lc == NULL) { if (lc == NULL) {
cmdq_error(item, "create pane failed: pane too small"); cmdq_error(item, "create pane failed: pane too small");

View File

@ -156,7 +156,7 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m)
u_int i; u_int i;
size_t dlen; size_t dlen;
char *out; char *out;
key_code justkey; key_code justkey, newkey;
struct utf8_data ud; struct utf8_data ud;
log_debug("writing key 0x%llx (%s) to %%%u", key, log_debug("writing key 0x%llx (%s) to %%%u", key,
@ -178,9 +178,10 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m)
/* Is this backspace? */ /* Is this backspace? */
if ((key & KEYC_MASK_KEY) == KEYC_BSPACE) { if ((key & KEYC_MASK_KEY) == KEYC_BSPACE) {
key = options_get_number(global_options, "backspace"); newkey = options_get_number(global_options, "backspace");
if (key >= 0x7f) if (newkey >= 0x7f)
key = '\177'; newkey = '\177';
key = newkey|(key & KEYC_MASK_MOD);
} }
/* /*

2
tmux.1
View File

@ -1895,7 +1895,7 @@ zooms the pane.
.Pp .Pp
This command works only if at least one client is attached. This command works only if at least one client is attached.
.It Xo Ic join-pane .It Xo Ic join-pane
.Op Fl bdhv .Op Fl bdfhv
.Op Fl l Ar size .Op Fl l Ar size
.Op Fl s Ar src-pane .Op Fl s Ar src-pane
.Op Fl t Ar dst-pane .Op Fl t Ar dst-pane