mirror of
https://github.com/tmux/tmux.git
synced 2024-12-25 10:58:48 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
c449512be4
@ -39,8 +39,8 @@ const struct cmd_entry cmd_display_message_entry = {
|
|||||||
.name = "display-message",
|
.name = "display-message",
|
||||||
.alias = "display",
|
.alias = "display",
|
||||||
|
|
||||||
.args = { "ac:d:INpt:F:v", 0, 1, NULL },
|
.args = { "ac:d:lINpt:F:v", 0, 1, NULL },
|
||||||
.usage = "[-aINpv] [-c target-client] [-d delay] [-F format] "
|
.usage = "[-aIlNpv] [-c target-client] [-d delay] [-F format] "
|
||||||
CMD_TARGET_PANE_USAGE " [message]",
|
CMD_TARGET_PANE_USAGE " [message]",
|
||||||
|
|
||||||
.target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL },
|
.target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL },
|
||||||
@ -132,7 +132,11 @@ cmd_display_message_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args_has(args, 'l'))
|
||||||
|
msg = xstrdup(template);
|
||||||
|
else
|
||||||
msg = format_expand_time(ft, template);
|
msg = format_expand_time(ft, template);
|
||||||
|
|
||||||
if (cmdq_get_client(item) == NULL)
|
if (cmdq_get_client(item) == NULL)
|
||||||
cmdq_error(item, "%s", msg);
|
cmdq_error(item, "%s", msg);
|
||||||
else if (args_has(args, 'p'))
|
else if (args_has(args, 'p'))
|
||||||
|
9
tmux.1
9
tmux.1
@ -5890,7 +5890,7 @@ The following keys are also available:
|
|||||||
.El
|
.El
|
||||||
.Tg display
|
.Tg display
|
||||||
.It Xo Ic display-message
|
.It Xo Ic display-message
|
||||||
.Op Fl aINpv
|
.Op Fl aIlNpv
|
||||||
.Op Fl c Ar target-client
|
.Op Fl c Ar target-client
|
||||||
.Op Fl d Ar delay
|
.Op Fl d Ar delay
|
||||||
.Op Fl t Ar target-pane
|
.Op Fl t Ar target-pane
|
||||||
@ -5912,7 +5912,12 @@ is not given, the
|
|||||||
option is used; a delay of zero waits for a key press.
|
option is used; a delay of zero waits for a key press.
|
||||||
.Ql N
|
.Ql N
|
||||||
ignores key presses and closes only after the delay expires.
|
ignores key presses and closes only after the delay expires.
|
||||||
The format of
|
If
|
||||||
|
.Fl l
|
||||||
|
is given,
|
||||||
|
.Ar message
|
||||||
|
is printed unchanged.
|
||||||
|
Otherwise, the format of
|
||||||
.Ar message
|
.Ar message
|
||||||
is described in the
|
is described in the
|
||||||
.Sx FORMATS
|
.Sx FORMATS
|
||||||
|
@ -508,6 +508,11 @@ window_buffer_key(struct window_mode_entry *wme, struct client *c,
|
|||||||
struct window_buffer_itemdata *item;
|
struct window_buffer_itemdata *item;
|
||||||
int finished;
|
int finished;
|
||||||
|
|
||||||
|
if (paste_get_top(NULL) == NULL) {
|
||||||
|
finished = 1;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
finished = mode_tree_key(mtd, c, &key, m, NULL, NULL);
|
finished = mode_tree_key(mtd, c, &key, m, NULL, NULL);
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'e':
|
case 'e':
|
||||||
@ -534,6 +539,8 @@ window_buffer_key(struct window_mode_entry *wme, struct client *c,
|
|||||||
finished = 1;
|
finished = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
if (finished || paste_get_top(NULL) == NULL)
|
if (finished || paste_get_top(NULL) == NULL)
|
||||||
window_pane_reset_mode(wp);
|
window_pane_reset_mode(wp);
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user