Utilities: Make less accept 'page up' and 'page down' keys

This commit is contained in:
Brandon van Houten 2021-07-12 12:33:33 +02:00 committed by Gunnar Beutner
parent f99507bf02
commit 19d34414bc
Notes: sideshowbarker 2024-07-18 09:11:21 +09:00

View File

@ -369,8 +369,10 @@ int main(int argc, char** argv)
} else if (sequence == "k" || sequence == "\e[A") {
if (!emulate_more)
pager.up();
} else if (sequence == " ") {
} else if (sequence == " " || sequence == "\e[6~") {
pager.down_page();
} else if (sequence == "\e[5~") {
pager.up_page();
}
if (quit_at_eof && pager.at_end())