aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/window.c b/window.c
index 97168455..9d0390a6 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD$ */
+/* $Id$ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -22,15 +22,12 @@
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
-#include <paths.h>
#include <pwd.h>
#include <signal.h>
-#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
-#include <util.h>
#include "tmux.h"
@@ -722,6 +719,10 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell,
if (tio != NULL)
memcpy(tio2.c_cc, tio->c_cc, sizeof tio2.c_cc);
tio2.c_cc[VERASE] = '\177';
+#ifdef IUTF8
+ if (options_get_number(&wp->window->options, "utf8"))
+ tio2.c_iflag |= IUTF8;
+#endif
if (tcsetattr(STDIN_FILENO, TCSANOW, &tio2) != 0)
fatal("tcgetattr failed");
@@ -858,6 +859,15 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
wp->mode->resize(wp, sx, sy);
if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
+#ifdef __sun
+ /*
+ * Some versions of Solaris apparently can return an error when
+ * resizing; don't know why this happens, can't reproduce on
+ * other platforms and ignoring it doesn't seem to cause any
+ * issues.
+ */
+ if (errno != EINVAL)
+#endif
fatal("ioctl failed");
}