The branch, master has been updated
       via  7b189f1ad78e8ad96a6896b2640fc0bbd3003201 (commit)
       via  42272dfbd5058724fc094eb3ea438ec6b7eb6cff (commit)
       via  eb0ad181e909c83fad8c1fd2a4a37271b6980ea2 (commit)
      from  5d60bc7f7c43c20fcf65531b5a5fb1fc7dcbb338 (commit)

- Log -----------------------------------------------------------------
commit 7b189f1ad78e8ad96a6896b2640fc0bbd3003201
Merge: 5d60bc7 42272df
Author: Thomas <tho...@xteddy.org>
Commit: Thomas <tho...@xteddy.org>

    Merge branch 'obsd-master'
    
    * obsd-master:
      Use pgrp of pty fd not pid of immediate child when recovering current 
working directory (like current process). From Marcel Partap.
      Use ACS characters for choose-tree arrows based on diff from Romain 
Francoise.



commit 42272dfbd5058724fc094eb3ea438ec6b7eb6cff
Author: Nicholas Marriott <n...@openbsd.org>
Commit: Nicholas Marriott <n...@openbsd.org>

    Use pgrp of pty fd not pid of immediate child when recovering current
    working directory (like current process). From Marcel Partap.
---
 cmd.c      |    2 +-
 format.c   |    2 +-
 procname.c |    8 +++++---
 tmux.h     |    2 +-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/cmd.c b/cmd.c
index 021c033..3a341b4 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1298,7 +1298,7 @@ cmd_get_default_path(struct cmd_ctx *ctx, const char *cwd)
                if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)
                        root = ctx->cmdclient->cwd;
                else if (ctx->curclient != NULL && s->curw != NULL)
-                       root = get_proc_cwd(s->curw->window->active->pid);
+                       root = get_proc_cwd(s->curw->window->active->fd);
                else
                        return (s->cwd);
                skip = 0;
diff --git a/format.c b/format.c
index bc63844..0eeb622 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", get_proc_cwd(wp->pid));
+       format_add(ft, "pane_current_path", "%s", get_proc_cwd(wp->fd));
        format_add(ft, "pane_pid", "%ld", (long) wp->pid);
        format_add(ft, "pane_tty", "%s", wp->tty);
 }
diff --git a/procname.c b/procname.c
index 370fe34..1928b92 100644
--- a/procname.c
+++ b/procname.c
@@ -36,7 +36,7 @@
 
 struct kinfo_proc      *cmp_procs(struct kinfo_proc *, struct kinfo_proc *);
 char                   *get_proc_name(int, char *);
-char                   *get_proc_cwd(pid_t);
+char                   *get_proc_cwd(int);
 
 struct kinfo_proc *
 cmp_procs(struct kinfo_proc *p1, struct kinfo_proc *p2)
@@ -133,12 +133,14 @@ error:
 }
 
 char*
-get_proc_cwd(pid_t pid)
+get_proc_cwd(int fd)
 {
-       int             name[] = { CTL_KERN, KERN_PROC_CWD, (int)pid };
+       int             name[] = { CTL_KERN, KERN_PROC_CWD, 0 };
        static char     path[MAXPATHLEN];
        size_t          pathlen = sizeof path;
 
+       if ((name[2] = tcgetpgrp(fd)) == -1)
+               return (NULL);
        if (sysctl(name, 3, path, &pathlen, NULL, 0) != 0)
                return (NULL);
        return (path);
diff --git a/tmux.h b/tmux.h
index c208361..90019bf 100644
--- a/tmux.h
+++ b/tmux.h
@@ -2277,7 +2277,7 @@ u_int     utf8_split2(u_int, u_char *);
 
 /* procname.c */
 char   *get_proc_name(int, char *);
-char   *get_proc_cwd(pid_t);
+char   *get_proc_cwd(int);
 
 /* log.c */
 void            log_open(int, const char *);


commit eb0ad181e909c83fad8c1fd2a4a37271b6980ea2
Author: Nicholas Marriott <n...@openbsd.org>
Commit: Nicholas Marriott <n...@openbsd.org>

    Use ACS characters for choose-tree arrows based on diff from Romain
    Francoise.
---
 cmd-choose-tree.c |    6 ++++--
 screen-write.c    |    8 ++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c
index f1533ac..52f06dc 100644
--- a/cmd-choose-tree.c
+++ b/cmd-choose-tree.c
@@ -149,8 +149,10 @@ cmd_choose_tree_exec(struct cmd *self, struct cmd_ctx *ctx)
         * without any padding.
         */
        if (wflag && sflag) {
-               xasprintf(&final_win_template_middle, " |-> %s", win_template);
-               xasprintf(&final_win_template_last, " \\-> %s", win_template);
+               xasprintf(&final_win_template_middle,
+                   " \001tq\001> %s", win_template);
+               xasprintf(&final_win_template_last,
+                   " \001mq\001> %s", win_template);
        } else if (wflag) {
                final_win_template_middle = xstrdup(win_template);
                final_win_template_last = xstrdup(win_template);
diff --git a/screen-write.c b/screen-write.c
index ee038e7..ce9411b 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -210,8 +210,12 @@ screen_write_vnputs(struct screen_write_ctx *ctx, ssize_t 
maxlen,
                        if (maxlen > 0 && size + 1 > (size_t) maxlen)
                                break;
 
-                       size++;
-                       screen_write_putc(ctx, gc, *ptr);
+                       if (*ptr == '\001')
+                               gc->attr ^= GRID_ATTR_CHARSET;
+                       else {
+                               size++;
+                               screen_write_putc(ctx, gc, *ptr);
+                       }
                        ptr++;
                }
        }


-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to