summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-09-24 12:53:56 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-09-24 12:53:56 +0000
commit2b852fbaa8b672c1ec48fbf65711750baf825594 (patch)
tree31f7b3976673ce1ee50ad7ca2f4339c48ece74bc /usr.bin/tmux
parenta6f8f2e787bcd036338dbf65bc123c6c0cb5ddf0 (diff)
Use ACS characters for choose-tree arrows based on diff from Romain
Francoise.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-choose-tree.c8
-rw-r--r--usr.bin/tmux/screen-write.c10
2 files changed, 12 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c
index 2611c169a94..ad183eebe75 100644
--- a/usr.bin/tmux/cmd-choose-tree.c
+++ b/usr.bin/tmux/cmd-choose-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-tree.c,v 1.10 2012/09/03 12:24:25 nicm Exp $ */
+/* $OpenBSD: cmd-choose-tree.c,v 1.11 2012/09/24 12:53:55 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -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/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index 55808aa129d..af6f85e9742 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.56 2012/07/10 11:53:01 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.57 2012/09/24 12:53:55 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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++;
}
}