# HG changeset patch # User Matti Hamalainen # Date 1307774945 -10800 # Node ID 863e3a26974d93c4cdda1aa3c6415d1012c2b80d # Parent b9c15c57dc8fcce44f0701db3af5a42ce5cd039e Twiddling with the PGUP / PGDN logic. diff -r b9c15c57dc8f -r 863e3a26974d nnchat.c --- a/nnchat.c Sat Jun 11 09:48:26 2011 +0300 +++ b/nnchat.c Sat Jun 11 09:49:05 2011 +0300 @@ -1750,10 +1750,18 @@ getmaxyx(mainWin, numLines, numCols); numLines = (numLines / 2) + 1; - if (c == KEY_PPAGE) - currWin->pos = (currWin->pos > numLines) ? currWin->pos - numLines : 0; - else - currWin->pos = (currWin->pos < currWin->data->n - numLines) ? currWin->pos + numLines : currWin->data->n - numLines; + if (c == KEY_PPAGE) { + if (currWin->pos > 10) + currWin->pos -= 10; + else + currWin->pos = 0; + } + else { + if (currWin->pos < currWin->data->size - 10) + currWin->pos += 10; + else + currWin->pos = currWin->data->size - 10; + } if (oldPos != currWin->pos) updateMain = TRUE;