mirror of
https://github.com/tmux/tmux.git
synced 2024-12-14 10:58:48 +00:00
Merge branch 'master' of github.com:tmux/tmux
This commit is contained in:
commit
eb1084754c
2
cfg.c
2
cfg.c
@ -97,7 +97,7 @@ load_cfg(const char *path, struct cmd_q *cmdq, char **cause)
|
|||||||
}
|
}
|
||||||
|
|
||||||
found = 0;
|
found = 0;
|
||||||
while ((buf = fparseln(f, NULL, &line, delim, 0))) {
|
while ((buf = fparseln(f, NULL, &line, delim, 0)) != NULL) {
|
||||||
log_debug("%s: %s", path, buf);
|
log_debug("%s: %s", path, buf);
|
||||||
|
|
||||||
/* Skip empty lines. */
|
/* Skip empty lines. */
|
||||||
|
4
client.c
4
client.c
@ -264,6 +264,10 @@ client_main(struct event_base *base, int argc, char **argv, int flags)
|
|||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
options_free(&global_options);
|
||||||
|
options_free(&global_s_options);
|
||||||
|
options_free(&global_w_options);
|
||||||
|
environ_free(&global_environ);
|
||||||
|
|
||||||
/* Set process title, log and signals now this is the client. */
|
/* Set process title, log and signals now this is the client. */
|
||||||
#ifdef HAVE_SETPROCTITLE
|
#ifdef HAVE_SETPROCTITLE
|
||||||
|
@ -136,6 +136,7 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
|
|||||||
status_timer_start(c);
|
status_timer_start(c);
|
||||||
notify_attached_session_changed(c);
|
notify_attached_session_changed(c);
|
||||||
session_update_activity(s, NULL);
|
session_update_activity(s, NULL);
|
||||||
|
gettimeofday(&s->last_attached_time, NULL);
|
||||||
server_redraw_client(c);
|
server_redraw_client(c);
|
||||||
s->curw->flags &= ~WINLINK_ALERTFLAGS;
|
s->curw->flags &= ~WINLINK_ALERTFLAGS;
|
||||||
} else {
|
} else {
|
||||||
@ -181,6 +182,7 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
|
|||||||
status_timer_start(c);
|
status_timer_start(c);
|
||||||
notify_attached_session_changed(c);
|
notify_attached_session_changed(c);
|
||||||
session_update_activity(s, NULL);
|
session_update_activity(s, NULL);
|
||||||
|
gettimeofday(&s->last_attached_time, NULL);
|
||||||
server_redraw_client(c);
|
server_redraw_client(c);
|
||||||
s->curw->flags &= ~WINLINK_ALERTFLAGS;
|
s->curw->flags &= ~WINLINK_ALERTFLAGS;
|
||||||
|
|
||||||
|
@ -278,6 +278,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
status_timer_start(c);
|
status_timer_start(c);
|
||||||
notify_attached_session_changed(c);
|
notify_attached_session_changed(c);
|
||||||
session_update_activity(s, NULL);
|
session_update_activity(s, NULL);
|
||||||
|
gettimeofday(&s->last_attached_time, NULL);
|
||||||
server_redraw_client(c);
|
server_redraw_client(c);
|
||||||
}
|
}
|
||||||
recalculate_sizes();
|
recalculate_sizes();
|
||||||
|
@ -129,6 +129,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
c->session = s;
|
c->session = s;
|
||||||
status_timer_start(c);
|
status_timer_start(c);
|
||||||
session_update_activity(s, NULL);
|
session_update_activity(s, NULL);
|
||||||
|
gettimeofday(&s->last_attached_time, NULL);
|
||||||
|
|
||||||
recalculate_sizes();
|
recalculate_sizes();
|
||||||
server_check_unattached();
|
server_check_unattached();
|
||||||
|
7
format.c
7
format.c
@ -889,6 +889,13 @@ format_defaults_session(struct format_tree *ft, struct session *s)
|
|||||||
format_add(ft, "session_created", "%lld", (long long) t);
|
format_add(ft, "session_created", "%lld", (long long) t);
|
||||||
format_add(ft, "session_created_string", "%s", format_time_string(t));
|
format_add(ft, "session_created_string", "%s", format_time_string(t));
|
||||||
|
|
||||||
|
t = s->last_attached_time.tv_sec;
|
||||||
|
if (t != 0) { /* zero if never attached */
|
||||||
|
format_add(ft, "session_last_attached", "%lld", (long long) t);
|
||||||
|
format_add(ft, "session_last_attached_string", "%s",
|
||||||
|
format_time_string(t));
|
||||||
|
}
|
||||||
|
|
||||||
t = s->activity_time.tv_sec;
|
t = s->activity_time.tv_sec;
|
||||||
format_add(ft, "session_activity", "%lld", (long long) t);
|
format_add(ft, "session_activity", "%lld", (long long) t);
|
||||||
format_add(ft, "session_activity_string", "%s", format_time_string(t));
|
format_add(ft, "session_activity_string", "%s", format_time_string(t));
|
||||||
|
@ -425,6 +425,7 @@ server_destroy_session(struct session *s)
|
|||||||
status_timer_start(c);
|
status_timer_start(c);
|
||||||
notify_attached_session_changed(c);
|
notify_attached_session_changed(c);
|
||||||
session_update_activity(s_new, NULL);
|
session_update_activity(s_new, NULL);
|
||||||
|
gettimeofday(&s_new->last_attached_time, NULL);
|
||||||
server_redraw_client(c);
|
server_redraw_client(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
tmux.1
2
tmux.1
@ -3406,6 +3406,8 @@ The following variables are available, where appropriate:
|
|||||||
.It Li "session_activity_string" Ta "" Ta "String time of session last activity"
|
.It Li "session_activity_string" Ta "" Ta "String time of session last activity"
|
||||||
.It Li "session_created" Ta "" Ta "Integer time session created"
|
.It Li "session_created" Ta "" Ta "Integer time session created"
|
||||||
.It Li "session_created_string" Ta "" Ta "String time session created"
|
.It Li "session_created_string" Ta "" Ta "String time session created"
|
||||||
|
.It Li "session_last_attached" Ta "" Ta "Integer time session last attached"
|
||||||
|
.It Li "session_last_attached_string" Ta "" Ta "String time session last attached"
|
||||||
.It Li "session_group" Ta "" Ta "Number of session group"
|
.It Li "session_group" Ta "" Ta "Number of session group"
|
||||||
.It Li "session_grouped" Ta "" Ta "1 if session in a group"
|
.It Li "session_grouped" Ta "" Ta "1 if session in a group"
|
||||||
.It Li "session_height" Ta "" Ta "Height of session"
|
.It Li "session_height" Ta "" Ta "Height of session"
|
||||||
|
Loading…
Reference in New Issue
Block a user