In vim's command mode, when I type 'H' the cursor usually doesn't go all the way to the top of the window, and 'L' doesn't go all the way to the bottom.
To investigate the problem, I created a 60-line buffer. Each line has a number on it, from 1 to 60. If line 1 is visible at the top of the window, then the last line in the window is 58. (If I type :echo winheight('%'), the number 58 appears in the bottom line.)
If I position the cursor at the first line (1G) and then type 'L', the cursor moves to line 53. Then typing 'H' gets me back to line 1. If I go to line 58 by typing '58G', the window scrolls and I see lines 3-60. If I then type 'H', I go to line 8 instead of 3.
How can I tweak vim to get 'H' and 'L' working properly?
I am running vim in a konsole window under Fedora Linux (35). The konsole version is 21.08.3. Vim is 8.2 that includes patches 1-3755.