aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--input.c2
-rw-r--r--screen.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/input.c b/input.c
index 9483bae1..35ae4164 100644
--- a/input.c
+++ b/input.c
@@ -475,7 +475,7 @@ input_state_string_next(u_char ch, struct input_ctx *ictx)
return;
}
- if (ch >= 0x20 && ch != 0x7f) {
+ if (ch >= 0x20) {
if (input_add_string(ictx, ch) != 0)
input_state(ictx, input_state_first);
return;
diff --git a/screen.c b/screen.c
index 4b355115..53b17bce 100644
--- a/screen.c
+++ b/screen.c
@@ -19,6 +19,7 @@
#include <sys/types.h>
#include <string.h>
+#include <vis.h>
#include "tmux.h"
@@ -65,8 +66,12 @@ screen_free(struct screen *s)
void
screen_set_title(struct screen *s, const char *title)
{
+ char tmp[BUFSIZ];
+
+ strnvis(tmp, title, sizeof tmp, VIS_OCTAL|VIS_TAB|VIS_NL);
+
xfree(s->title);
- s->title = xstrdup(title);
+ s->title = xstrdup(tmp);
}
/* Resize screen. */