X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fdrv%2Fvterm_input.c;h=6c25cc81974a888863f4b653a9630f6d8abd8500;hb=9ae39ccdd3d650b307dee2726efd38dca3233854;hp=3e86087b3ec000f6f8c8be04b6eb5d375533305a;hpb=1dc089a0b5b31e8e75e85128a03b7be20d4995f5;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; }