summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-choose-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-choose-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-choose-buffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-choose-buffer.c b/usr.bin/tmux/cmd-choose-buffer.c
index 4c4440da97d..99ca9020e71 100644
--- a/usr.bin/tmux/cmd-choose-buffer.c
+++ b/usr.bin/tmux/cmd-choose-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-buffer.c,v 1.15 2013/10/10 12:00:18 nicm Exp $ */
+/* $OpenBSD: cmd-choose-buffer.c,v 1.16 2014/04/02 18:12:18 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -49,6 +49,7 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
char *action, *action_data;
const char *template;
u_int idx;
+ int utf8flag;
if ((c = cmd_current_client(cmdq)) == NULL) {
cmdq_error(cmdq, "no client available");
@@ -60,6 +61,7 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL)
return (CMD_RETURN_ERROR);
+ utf8flag = options_get_number(&wl->window->options, "utf8");
if (paste_get_top(&global_buffers) == NULL)
return (CMD_RETURN_NORMAL);
@@ -79,7 +81,7 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
cdata->ft_template = xstrdup(template);
format_add(cdata->ft, "line", "%u", idx - 1);
- format_paste_buffer(cdata->ft, pb);
+ format_paste_buffer(cdata->ft, pb, utf8flag);
xasprintf(&action_data, "%u", idx - 1);
cdata->command = cmd_template_replace(action, action_data, 1);