From cf5e8380842264efb55857ee79b81a84f826cfc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksandar=20Popadi=C4=87?= Date: Mon, 6 Jan 2014 21:40:09 +0100 Subject: [PATCH] Do not scroll on Shift-PgUp when in alternate buffer. Test Plan: build some history, vi, Shift+PgUp -> it scrolls when it shouldn't Reviewers: billiob Differential Revision: https://phab.enlightenment.org/D422 --- src/bin/termio.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index ea33ad2c..e55fa4ba 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -2000,10 +2000,13 @@ _handle_shift(Evas_Event_Key_Down *ev, int by, Evas_Object *term, Termio *sd) { if (!strcmp(ev->key, "Prior")) { - sd->scroll += by; - if (sd->scroll > sd->pty->backscroll_num) - sd->scroll = sd->pty->backscroll_num; - _smart_update_queue(term, sd); + if (!(sd->pty->altbuf)) + { + sd->scroll += by; + if (sd->scroll > sd->pty->backscroll_num) + sd->scroll = sd->pty->backscroll_num; + _smart_update_queue(term, sd); + } } else if (!strcmp(ev->key, "Next")) {