From 84612a8196341839c5a18362b68047aa1b011a50 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 24 Sep 2012 13:39:10 +0000 Subject: [PATCH 1/4] Add control_write_buffer, from George Nachman. --- control.c | 9 +++++++++ tmux.h | 1 + 2 files changed, 10 insertions(+) diff --git a/control.c b/control.c index c0d9e812..cb6633ce 100644 --- a/control.c +++ b/control.c @@ -79,6 +79,15 @@ control_write(struct client *c, const char *fmt, ...) server_push_stdout(c); } +/* Write a buffer, adding a terminal newline. Empties buffer. */ +void +control_write_buffer(struct client *c, struct evbuffer *buffer) +{ + evbuffer_add_buffer(c->stdout_data, buffer); + evbuffer_add(c->stdout_data, "\n", 1); + server_push_stdout(c); +} + /* Control input callback. Read lines and fire commands. */ void control_callback(struct client *c, int closed, unused void *data) diff --git a/tmux.h b/tmux.h index 90019bf2..b1e1eeeb 100644 --- a/tmux.h +++ b/tmux.h @@ -2221,6 +2221,7 @@ void clear_signals(int); /* control.c */ void control_callback(struct client *, int, void*); void printflike2 control_write(struct client *, const char *, ...); +void control_write_buffer(struct client *, struct evbuffer *); /* control-notify.c */ void control_notify_window_layout_changed(struct window *); From 69683ba7b453c8460c6cd6fbff1e4ef210d34ed1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 24 Sep 2012 12:53:55 +0000 Subject: [PATCH 2/4] 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 dd6dd3b3..e8da7a42 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 2b373d77..66a62b3a 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++; } } From d785c37ee277457433daf1553424b1d815f9e2f9 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 24 Sep 2012 13:56:32 +0100 Subject: [PATCH 3/4] Fix some UTF-8 Japanese issue on OS X, SF bug 3566884. --- utf8.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utf8.c b/utf8.c index 7fb11813..88d847a6 100644 --- a/utf8.c +++ b/utf8.c @@ -135,7 +135,9 @@ struct utf8_width_entry utf8_width_table[] = { { 0x0135f, 0x0135f, 0, NULL, NULL }, { 0x01a17, 0x01a18, 0, NULL, NULL }, { 0x006e7, 0x006e8, 0, NULL, NULL }, +#ifndef __APPLE__ { 0x03099, 0x0309a, 0, NULL, NULL }, +#endif { 0x00b4d, 0x00b4d, 0, NULL, NULL }, { 0x00ce2, 0x00ce3, 0, NULL, NULL }, { 0x00bcd, 0x00bcd, 0, NULL, NULL }, From 253f1395a03b7b3371799055a7e3a442a8fa7ba6 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Mon, 24 Sep 2012 18:03:04 +0100 Subject: [PATCH 4/4] Don't rely on "-s ours" for merging The ours strategy assumes one subsumes the other -- which isn't the case for the portable version, so for now -- just go back to using the default merge strategy of recursive, and fix-up any conflicts manually. --- SYNCING | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SYNCING b/SYNCING index 70e532c1..d32a8c60 100644 --- a/SYNCING +++ b/SYNCING @@ -113,11 +113,9 @@ portable: % git log master..obsd-master -From there, the merge should be a fast-forward, using the OURS strategy to -tell git that conflicts coming from OpenBSD respect the existing code in -tmux where those conflicts wouldn't arise. Hence: +From there, merge the result in, fixing up any conflicts which might arise. -% git merge -s ours obsd-master +% git merge obsd-master Then ensure things look correct by BULDING the result of that sync: