summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-02-08 00:14:38 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-02-08 00:14:38 +0000
commit11dedde511e2d4adb57027edcb9d823b8269c368 (patch)
tree142b2e0fb673d3a85f7f0db6b5375d0aa185345b /input.c
parent2dc74f2e4d754b868286d1adc0e686d707be38fc (diff)
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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/input.c b/input.c
index cfa42406..bf31413c 100644
--- a/input.c
+++ b/input.c
@@ -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);