From 15f6a41a753196bd59607f1ca0ea082608bbc3eb Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sun, 9 Aug 2009 15:26:24 +0000 Subject: Sync OpenBSD patchset 211: Add a terminal-overrides session option allowing individual terminfo(5) entries to be overridden. The 88col/256col checks are now moved into the default setting and out of the code. Also remove a couple of old workarounds for xterm and rxvt which are no longer necessary (tmux can emulate them if missing). --- cmd-attach-session.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cmd-attach-session.c') diff --git a/cmd-attach-session.c b/cmd-attach-session.c index 0160f79e..d39cdeff 100644 --- a/cmd-attach-session.c +++ b/cmd-attach-session.c @@ -1,4 +1,4 @@ -/* $Id: cmd-attach-session.c,v 1.30 2009-07-28 22:12:16 tcunha Exp $ */ +/* $Id: cmd-attach-session.c,v 1.31 2009-08-09 15:26:24 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -43,7 +43,7 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx) struct cmd_target_data *data = self->data; struct session *s; struct client *c; - char *cause; + char *overrides, *cause; u_int i; if (ARRAY_LENGTH(&sessions) == 0) { @@ -80,7 +80,9 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx) return (-1); } - if (tty_open(&ctx->cmdclient->tty, &cause) != 0) { + overrides = + options_get_string(&s->options, "terminal-overrides"); + if (tty_open(&ctx->cmdclient->tty, overrides, &cause) != 0) { ctx->error(ctx, "terminal open failed: %s", cause); xfree(cause); return (-1); -- cgit