Fix pgdown for small JSON files

Fixes #265
This commit is contained in:
Anton Medvedev 2023-09-19 21:42:08 +02:00
parent adf3775828
commit cacddc7bcb
No known key found for this signature in database

View File

@ -311,6 +311,7 @@ func (m *model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
for i := 0; i < m.viewHeight(); i++ {
m.down()
}
m.scrollIntoView()
case key.Matches(msg, keyMap.HalfPageUp):
m.cursor = 0
@ -323,6 +324,7 @@ func (m *model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
for i := 0; i < m.viewHeight()/2; i++ {
m.down()
}
m.scrollIntoView()
case key.Matches(msg, keyMap.GotoTop):
m.head = m.top