Implement page up/page down

This commit is contained in:
Jeremy Soller 2022-10-12 14:42:30 -06:00
parent aed6860568
commit 7e9721476d
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -244,6 +244,12 @@ fn main() {
orbclient::K_DOWN if event.pressed => buffer.action(TextAction::Down),
orbclient::K_BKSP if event.pressed => buffer.action(TextAction::Backspace),
orbclient::K_DEL if event.pressed => buffer.action(TextAction::Delete),
orbclient::K_PGUP if event.pressed => {
scroll -= window_lines;
},
orbclient::K_PGDN if event.pressed => {
scroll += window_lines;
},
orbclient::K_0 if event.pressed && ctrl_pressed => {
font_size_i = font_size_default;
buffer.set_font_size(font_sizes[font_size_i].0 * display_scale);