X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fdrv%2Fvterm_input.c;h=6c25cc81974a888863f4b653a9630f6d8abd8500;hb=9659f4f4435c25edeafacece13450da80c9d5066;hp=3e86087b3ec000f6f8c8be04b6eb5d375533305a;hpb=573469df47d366903d780ca563c9f2da18f2bf62;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/drv/vterm_input.c b/KernelLand/Kernel/drv/vterm_input.c index 3e86087b..6c25cc81 100644 --- a/KernelLand/Kernel/drv/vterm_input.c +++ b/KernelLand/Kernel/drv/vterm_input.c @@ -101,16 +101,14 @@ void VT_KBCallBack(Uint32 Codepoint) case KEYSYM_PGUP: if( term->Flags & VT_FLAG_ALTBUF ) return ; - term->ViewPos = MAX( 0, term->ViewPos - term->Width ); + term->ViewTopRow = MAX(0, term->ViewTopRow - 1); VT_int_UpdateScreen(term, 1); return; case KEYSYM_PGDN: if( term->Flags & VT_FLAG_ALTBUF ) return ; - term->ViewPos = MIN( - term->ViewPos + term->Width, - term->Width * term->Height * giVT_Scrollback - ); + // Note the lack of giVT_Scrollback+1, view top can't go above size-onescreen + term->ViewTopRow = MIN(term->ViewTopRow + 1, term->Height * giVT_Scrollback); VT_int_UpdateScreen(term, 1); return; }