aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2012-09-24 14:05:38 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2012-09-24 14:05:38 +0100
commit5d60bc7f7c43c20fcf65531b5a5fb1fc7dcbb338 (patch)
treefd7cdea8dd53657a1545db7df6f2baa1e1c2f574 /format.c
parent5b85efeb93d44e504e36ae06a91c2e1b8b82c50e (diff)
downloadrtmux-5d60bc7f7c43c20fcf65531b5a5fb1fc7dcbb338.tar.gz
rtmux-5d60bc7f7c43c20fcf65531b5a5fb1fc7dcbb338.tar.bz2
rtmux-5d60bc7f7c43c20fcf65531b5a5fb1fc7dcbb338.zip
Use pgrp of pty fd not pid of immediate child when recovering current working
directory (like current process). From Marcel Partap.
Diffstat (limited to 'format.c')
-rw-r--r--format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/format.c b/format.c
index 55d51df5..19f322ae 100644
--- a/format.c
+++ b/format.c
@@ -391,7 +391,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_start_command", "%s", wp->cmd);
if (wp->cwd != NULL)
format_add(ft, "pane_start_path", "%s", wp->cwd);
- format_add(ft, "pane_current_path", "%s", osdep_get_cwd(wp->pid));
+ format_add(ft, "pane_current_path", "%s", osdep_get_cwd(wp->fd));
format_add(ft, "pane_pid", "%ld", (long) wp->pid);
format_add(ft, "pane_tty", "%s", wp->tty);
}