Created
July 13, 2012 08:03
-
-
Save ThomasAdam/3103507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/trunk/cmd-choose-tree.c b/trunk/cmd-choose-tree.c | |
index b33bf34..5aed8c9 100644 | |
--- a/trunk/cmd-choose-tree.c | |
+++ b/trunk/cmd-choose-tree.c | |
@@ -77,6 +77,7 @@ cmd_choose_tree_exec(struct cmd *self, struct cmd_ctx *ctx) | |
struct winlink *wl, *wm; | |
struct session *s, *s2; | |
struct window_choose_data *wcd = NULL; | |
+ struct tty *tty; | |
const char *ses_template, *win_template; | |
char *final_win_action, *final_win_template; | |
const char *ses_action, *win_action; | |
@@ -91,6 +92,7 @@ cmd_choose_tree_exec(struct cmd *self, struct cmd_ctx *ctx) | |
return (CMD_RETURN_ERROR); | |
} | |
+ tty = &ctx->curclient->tty; | |
s = ctx->curclient->session; | |
if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) | |
@@ -148,9 +150,15 @@ cmd_choose_tree_exec(struct cmd *self, struct cmd_ctx *ctx) | |
* window template, otherwise just render the windows as a flat list | |
* without any padding. | |
*/ | |
- if (wflag && sflag) | |
- xasprintf(&final_win_template, " --> %s", win_template); | |
- else if (wflag) | |
+ if (wflag && sflag) { | |
+ if (tty->flags & TTY_UTF8) | |
+ xasprintf(&final_win_template, " %s%s> %s", | |
+ tty_acs_get(tty, 't'), tty_acs_get(tty, 'q'), | |
+ win_template); | |
+ else | |
+ xasprintf(&final_win_template, " --> %s", | |
+ win_template); | |
+ } else if (wflag) | |
final_win_template = xstrdup(win_template); | |
else | |
final_win_template = NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment