diff --git a/clite/commands.js b/clite/commands.js index e497c11..16b6f3f 100644 --- a/clite/commands.js +++ b/clite/commands.js @@ -388,6 +388,30 @@ Options: showAt(topLine); } break; + case 'PageUp': + if (topLine > 0) { + topLine -= tty.lines-1; + if (topLine < 0) + topLine = 0; + showAt(topLine); + } + break; + case 'PageDown': + if (topLine < bottomLine) { + topLine += tty.lines-1; + if (topLine >= bottomLine) + topLine = bottomLine; + showAt(topLine); + } + break; + case 'Home': + topLine = 0; + showAt(topLine); + break; + case 'End': + topLine = bottomLine; + showAt(topLine); + break; } }); tty.draw('Loading...');