From 992ef70fb696d648b3ec6ed97642fd79a8392baf Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 17 Apr 2014 07:36:45 +0000 Subject: Remove the monitor-content option and associated bits and bobs. It's never worked very well. If there is a big demand for it to return, will consider better ways to do it. --- window.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index bb69c0bc..d934dabb 100644 --- a/window.c +++ b/window.c @@ -699,8 +699,6 @@ window_printable_flags(struct session *s, struct winlink *wl) flags[pos++] = '#'; if (wl->flags & WINLINK_BELL) flags[pos++] = '!'; - if (wl->flags & WINLINK_CONTENT) - flags[pos++] = '+'; if (wl->flags & WINLINK_SILENCE) flags[pos++] = '~'; if (wl == s->curw) -- cgit From 2e98c9057de6c5700ca01bd58932373b103ef976 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 17 Apr 2014 09:13:13 +0000 Subject: Correct the dance to fix the active pane in join-pane by pulling the (right) code from break-pane and window_remove_pane into a helper function. --- window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'window.c') diff --git a/window.c b/window.c index d934dabb..faea6049 100644 --- a/window.c +++ b/window.c @@ -591,7 +591,7 @@ window_add_pane(struct window *w, u_int hlimit) } void -window_remove_pane(struct window *w, struct window_pane *wp) +window_lost_pane(struct window *w, struct window_pane *wp) { if (wp == w->active) { w->active = w->last; @@ -603,6 +603,12 @@ window_remove_pane(struct window *w, struct window_pane *wp) } } else if (wp == w->last) w->last = NULL; +} + +void +window_remove_pane(struct window *w, struct window_pane *wp) +{ + window_lost_pane(w, wp); TAILQ_REMOVE(&w->panes, wp, entry); window_pane_destroy(wp); -- cgit From bce952777a491c5099693e2c256a14e51aecfaa6 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 17 Apr 2014 11:38:35 +0000 Subject: Remove some unnecessary includes and fix a typo. --- window.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index faea6049..575ac909 100644 --- a/window.c +++ b/window.c @@ -17,14 +17,10 @@ */ #include -#include #include #include #include -#include -#include -#include #include #include #include -- cgit From 3e27be353d045ea231259e96892ad8be273bf9ae Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 17 Apr 2014 13:02:59 +0000 Subject: Set PATH explicitly, either from client or session environment. Previously it came from the session environment. From J Raynor. --- window.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index 575ac909..2e460641 100644 --- a/window.c +++ b/window.c @@ -308,8 +308,8 @@ window_create1(u_int sx, u_int sy) } struct window * -window_create(const char *name, const char *cmd, const char *shell, - int cwd, struct environ *env, struct termios *tio, +window_create(const char *name, const char *cmd, const char *path, + const char *shell, int cwd, struct environ *env, struct termios *tio, u_int sx, u_int sy, u_int hlimit, char **cause) { struct window *w; @@ -319,7 +319,8 @@ window_create(const char *name, const char *cmd, const char *shell, wp = window_add_pane(w, hlimit); layout_init(w, wp); - if (window_pane_spawn(wp, cmd, shell, cwd, env, tio, cause) != 0) { + if (window_pane_spawn(wp, cmd, path, shell, cwd, env, tio, + cause) != 0) { window_destroy(w); return (NULL); } @@ -810,8 +811,9 @@ window_pane_destroy(struct window_pane *wp) } int -window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell, - int cwd, struct environ *env, struct termios *tio, char **cause) +window_pane_spawn(struct window_pane *wp, const char *cmd, const char *path, + const char *shell, int cwd, struct environ *env, struct termios *tio, + char **cause) { struct winsize ws; char *argv0, paneid[16]; @@ -860,6 +862,8 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell, closefrom(STDERR_FILENO + 1); + if (path != NULL) + environ_set(env, "PATH", path); xsnprintf(paneid, sizeof paneid, "%%%u", wp->id); environ_set(env, "TMUX_PANE", paneid); environ_push(env); -- cgit From a5d4b7f3d927b267e21aa34c2451669318536e46 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 17 Apr 2014 14:45:49 +0000 Subject: Some more long lines. --- window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'window.c') diff --git a/window.c b/window.c index 2e460641..1b36f7d7 100644 --- a/window.c +++ b/window.c @@ -1162,7 +1162,8 @@ window_pane_visible(struct window_pane *wp) } char * -window_pane_search(struct window_pane *wp, const char *searchstr, u_int *lineno) +window_pane_search(struct window_pane *wp, const char *searchstr, + u_int *lineno) { struct screen *s = &wp->base; char *newsearchstr, *line, *msg; -- cgit