mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
Rename a function for consistency and some spacing nits.
This commit is contained in:
@ -196,7 +196,7 @@ control_notify_session_created(__unused struct session *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
control_notify_session_close(__unused struct session *s)
|
control_notify_session_closed(__unused struct session *s)
|
||||||
{
|
{
|
||||||
struct client *c;
|
struct client *c;
|
||||||
|
|
||||||
|
2
notify.c
2
notify.c
@ -147,7 +147,7 @@ notify_drain(void)
|
|||||||
control_notify_session_created(ne->session);
|
control_notify_session_created(ne->session);
|
||||||
break;
|
break;
|
||||||
case NOTIFY_SESSION_CLOSED:
|
case NOTIFY_SESSION_CLOSED:
|
||||||
control_notify_session_close(ne->session);
|
control_notify_session_closed(ne->session);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
TAILQ_REMOVE(¬ify_queue, ne, entry);
|
TAILQ_REMOVE(¬ify_queue, ne, entry);
|
||||||
|
@ -211,6 +211,7 @@ session_destroy(struct session *s)
|
|||||||
struct winlink *wl;
|
struct winlink *wl;
|
||||||
|
|
||||||
log_debug("session %s destroyed", s->name);
|
log_debug("session %s destroyed", s->name);
|
||||||
|
s->curw = NULL;
|
||||||
|
|
||||||
RB_REMOVE(sessions, &sessions, s);
|
RB_REMOVE(sessions, &sessions, s);
|
||||||
notify_session_closed(s);
|
notify_session_closed(s);
|
||||||
@ -385,14 +386,17 @@ int
|
|||||||
session_detach(struct session *s, struct winlink *wl)
|
session_detach(struct session *s, struct winlink *wl)
|
||||||
{
|
{
|
||||||
if (s->curw == wl &&
|
if (s->curw == wl &&
|
||||||
session_last(s) != 0 && session_previous(s, 0) != 0)
|
session_last(s) != 0 &&
|
||||||
|
session_previous(s, 0) != 0)
|
||||||
session_next(s, 0);
|
session_next(s, 0);
|
||||||
|
|
||||||
wl->flags &= ~WINLINK_ALERTFLAGS;
|
wl->flags &= ~WINLINK_ALERTFLAGS;
|
||||||
notify_window_unlinked(s, wl->window);
|
notify_window_unlinked(s, wl->window);
|
||||||
winlink_stack_remove(&s->lastw, wl);
|
winlink_stack_remove(&s->lastw, wl);
|
||||||
winlink_remove(&s->windows, wl);
|
winlink_remove(&s->windows, wl);
|
||||||
|
|
||||||
session_group_synchronize_from(s);
|
session_group_synchronize_from(s);
|
||||||
|
|
||||||
if (RB_EMPTY(&s->windows)) {
|
if (RB_EMPTY(&s->windows)) {
|
||||||
session_destroy(s);
|
session_destroy(s);
|
||||||
return (1);
|
return (1);
|
||||||
|
2
tmux.h
2
tmux.h
@ -2208,7 +2208,7 @@ void control_notify_window_renamed(struct window *);
|
|||||||
void control_notify_attached_session_changed(struct client *);
|
void control_notify_attached_session_changed(struct client *);
|
||||||
void control_notify_session_renamed(struct session *);
|
void control_notify_session_renamed(struct session *);
|
||||||
void control_notify_session_created(struct session *);
|
void control_notify_session_created(struct session *);
|
||||||
void control_notify_session_close(struct session *);
|
void control_notify_session_closed(struct session *);
|
||||||
|
|
||||||
/* session.c */
|
/* session.c */
|
||||||
extern struct sessions sessions;
|
extern struct sessions sessions;
|
||||||
|
Reference in New Issue
Block a user