mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 12:14:43 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -30,8 +30,8 @@ const struct cmd_entry cmd_copy_mode_entry = {
|
|||||||
.name = "copy-mode",
|
.name = "copy-mode",
|
||||||
.alias = NULL,
|
.alias = NULL,
|
||||||
|
|
||||||
.args = { "deHMqSs:t:u", 0, 0, NULL },
|
.args = { "dekHMqSs:t:u", 0, 0, NULL },
|
||||||
.usage = "[-deHMqSu] [-s src-pane] " CMD_TARGET_PANE_USAGE,
|
.usage = "[-dekHMqSu] [-s src-pane] " CMD_TARGET_PANE_USAGE,
|
||||||
|
|
||||||
.source = { 's', CMD_FIND_PANE, 0 },
|
.source = { 's', CMD_FIND_PANE, 0 },
|
||||||
.target = { 't', CMD_FIND_PANE, 0 },
|
.target = { 't', CMD_FIND_PANE, 0 },
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
sc.cwd = args_get(args, 'c');
|
sc.cwd = args_get(args, 'c');
|
||||||
|
|
||||||
sc.flags = 0;
|
sc.flags = 0;
|
||||||
if (args_has(args, 'E'))
|
if (args_has(args, 'E') || (count == 1 && *args_string(args, 0) == '\0'))
|
||||||
sc.flags |= SPAWN_EMPTY;
|
sc.flags |= SPAWN_EMPTY;
|
||||||
if (args_has(args, 'd'))
|
if (args_has(args, 'd'))
|
||||||
sc.flags |= SPAWN_DETACHED;
|
sc.flags |= SPAWN_DETACHED;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
flags |= SPAWN_FULLSIZE;
|
flags |= SPAWN_FULLSIZE;
|
||||||
|
|
||||||
input = args_has(args, 'I');
|
input = args_has(args, 'I');
|
||||||
if (input)
|
if (input || (count == 1 && *args_string(args, 0) == '\0'))
|
||||||
empty = 1;
|
empty = 1;
|
||||||
else
|
else
|
||||||
empty = args_has(args, 'E');
|
empty = args_has(args, 'E');
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ server_destroy_session(struct session *s)
|
|||||||
{
|
{
|
||||||
struct client *c;
|
struct client *c;
|
||||||
struct session *s_new = NULL, *cs_new = NULL, *use_s;
|
struct session *s_new = NULL, *cs_new = NULL, *use_s;
|
||||||
|
struct sort_criteria sort_crit = { .order = SORT_NAME };
|
||||||
int detach_on_destroy;
|
int detach_on_destroy;
|
||||||
|
|
||||||
detach_on_destroy = options_get_number(s->options, "detach-on-destroy");
|
detach_on_destroy = options_get_number(s->options, "detach-on-destroy");
|
||||||
@@ -446,9 +447,11 @@ server_destroy_session(struct session *s)
|
|||||||
else if (detach_on_destroy == 2)
|
else if (detach_on_destroy == 2)
|
||||||
s_new = server_find_session(s, server_newer_detached_session);
|
s_new = server_find_session(s, server_newer_detached_session);
|
||||||
else if (detach_on_destroy == 3)
|
else if (detach_on_destroy == 3)
|
||||||
s_new = session_previous_session(s, NULL);
|
s_new = session_previous_session(s, &sort_crit);
|
||||||
else if (detach_on_destroy == 4)
|
else if (detach_on_destroy == 4)
|
||||||
s_new = session_next_session(s, NULL);
|
s_new = session_next_session(s, &sort_crit);
|
||||||
|
if (s_new == s)
|
||||||
|
s_new = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If no suitable new session was found above, then look for any
|
* If no suitable new session was found above, then look for any
|
||||||
|
|||||||
5
tmux.1
5
tmux.1
@@ -2587,7 +2587,7 @@ The synopsis for the
|
|||||||
command is:
|
command is:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Xo Ic copy\-mode
|
.It Xo Ic copy\-mode
|
||||||
.Op Fl deHMqSu
|
.Op Fl dekHMqSu
|
||||||
.Op Fl s Ar src\-pane
|
.Op Fl s Ar src\-pane
|
||||||
.Op Fl t Ar target\-pane
|
.Op Fl t Ar target\-pane
|
||||||
.Xc
|
.Xc
|
||||||
@@ -2627,6 +2627,9 @@ example with:
|
|||||||
bind PageUp copy\-mode \-eu
|
bind PageUp copy\-mode \-eu
|
||||||
bind PageDown copy\-mode \-ed
|
bind PageDown copy\-mode \-ed
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
|
.Fl k
|
||||||
|
kills the pane when the mode is exited.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
A number of preset arrangements of panes are available, these are called
|
A number of preset arrangements of panes are available, these are called
|
||||||
|
|||||||
18
window.c
18
window.c
@@ -2423,7 +2423,6 @@ window_pane_get_theme(struct window_pane *wp)
|
|||||||
{
|
{
|
||||||
struct window *w;
|
struct window *w;
|
||||||
struct client *loop;
|
struct client *loop;
|
||||||
enum client_theme theme;
|
|
||||||
int found_light = 0, found_dark = 0;
|
int found_light = 0, found_dark = 0;
|
||||||
|
|
||||||
if (wp == NULL)
|
if (wp == NULL)
|
||||||
@@ -2431,14 +2430,9 @@ window_pane_get_theme(struct window_pane *wp)
|
|||||||
w = wp->window;
|
w = wp->window;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Derive theme from pane background color, if it's not the default
|
* Prefer a theme reported by an attached client with mode 2031 or DSR
|
||||||
* colour.
|
* 996: the terminal knows its own light or dark mode.
|
||||||
*/
|
*/
|
||||||
theme = colour_totheme(window_pane_get_bg(wp));
|
|
||||||
if (theme != THEME_UNKNOWN)
|
|
||||||
return (theme);
|
|
||||||
|
|
||||||
/* Try to find a client that has a theme. */
|
|
||||||
TAILQ_FOREACH(loop, &clients, entry) {
|
TAILQ_FOREACH(loop, &clients, entry) {
|
||||||
if (loop->flags & CLIENT_UNATTACHEDFLAGS)
|
if (loop->flags & CLIENT_UNATTACHEDFLAGS)
|
||||||
continue;
|
continue;
|
||||||
@@ -2455,12 +2449,16 @@ window_pane_get_theme(struct window_pane *wp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found_dark && !found_light)
|
if (found_dark && !found_light)
|
||||||
return (THEME_DARK);
|
return (THEME_DARK);
|
||||||
if (found_light && !found_dark)
|
if (found_light && !found_dark)
|
||||||
return (THEME_LIGHT);
|
return (THEME_LIGHT);
|
||||||
return (THEME_UNKNOWN);
|
|
||||||
|
/*
|
||||||
|
* Otherwise guess from the pane background colour, for terminals which
|
||||||
|
* do not report a theme themselves.
|
||||||
|
*/
|
||||||
|
return (colour_totheme(window_pane_get_bg(wp)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user