Merge branch 'bilbofroggins-patch-1' of https://github.com/bilbofroggins/kitty

This commit is contained in:
Kovid Goyal 2025-04-06 09:08:42 +05:30
commit 7c9f1e059b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 16 additions and 0 deletions

View file

@ -196,10 +196,23 @@ map('Scroll to next page',
map('Scroll to next page',
'scroll_page_down space scroll_to next-page',
)
map('Scroll to next page',
'scroll_page_down ctrl+f scroll_to next-page',
)
map('Scroll to previous page',
'scroll_page_up page_up scroll_to prev-page',
)
map('Scroll to previous page',
'scroll_page_up ctrl+b scroll_to prev-page',
)
map('Scroll down half page',
'scroll_half_page_down ctrl+d scroll_to next-half-page',
)
map('Scroll up half page',
'scroll_half_page_up ctrl+u scroll_to prev-half-page',
)
map('Scroll to next change',
'next_change n scroll_to next-change',

View file

@ -695,6 +695,9 @@ func (self *Handler) dispatch_action(name, args string) error {
done = self.scroll_to_next_match(strings.Contains(args, `prev`), false)
case strings.Contains(args, `page`):
amt := self.screen_size.num_lines
if strings.Contains(args, `half`) {
amt = amt / 2
}
if strings.Contains(args, `prev`) {
amt *= -1
}