summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-02-08 18:32:34 +0000
committerTiago Cunha <tcunha@gmx.com>2010-02-08 18:32:34 +0000
commit10abdd97cf23b7a389cb9b97f4d68a142e8e4bf0 (patch)
tree87b103204b998777e24379e1779370e1c49bdfdf /input.c
parentc3c65c32a5ebe50fdadcf280f2d69e8879088fb9 (diff)
Sync OpenBSD patchset 642:
Add an option to disable the smcup/rmcup alternate screen behaviour inside tmux. From clemens fischer.
Diffstat (limited to 'input.c')
-rw-r--r--input.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/input.c b/input.c
index 27674d0c..6d457880 100644
--- a/input.c
+++ b/input.c
@@ -1,4 +1,4 @@
-/* $Id: input.c,v 1.106 2010-01-08 16:22:02 tcunha Exp $ */
+/* $Id: input.c,v 1.107 2010-02-08 18:32:34 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1148,6 +1148,7 @@ void
input_handle_sequence_sm(struct input_ctx *ictx)
{
struct window_pane *wp = ictx->wp;
+ struct options *oo = &wp->window->options;
struct screen *s = &wp->base;
u_int sx, sy;
uint16_t n;
@@ -1178,6 +1179,8 @@ input_handle_sequence_sm(struct input_ctx *ictx)
case 1049:
if (wp->saved_grid != NULL)
break;
+ if (!options_get_number(oo, "alternate-screen"))
+ break;
sx = screen_size_x(s);
sy = screen_size_y(s);
@@ -1224,6 +1227,7 @@ void
input_handle_sequence_rm(struct input_ctx *ictx)
{
struct window_pane *wp = ictx->wp;
+ struct options *oo = &wp->window->options;
struct screen *s = &wp->base;
u_int sx, sy;
uint16_t n;
@@ -1254,6 +1258,8 @@ input_handle_sequence_rm(struct input_ctx *ictx)
case 1049:
if (wp->saved_grid == NULL)
break;
+ if (!options_get_number(oo, "alternate-screen"))
+ break;
sx = screen_size_x(s);
sy = screen_size_y(s);