Red Hat Bugzilla – Bug 1471449
vi cursor movement incorrect for H and L commands
Last modified: 2017-07-18 08:48:22 EDT
Description of problem: The command L in vi to move to the last line actually stops 5 lines above the last line; similarly, a G to go to the last line of the file followed by H to move to the first screen line stops 5 lines below the top line.
Version-Release number of selected component (if applicable): 8.0.705
How reproducible: Open a file that has more lines than the window and type L; cursor stops about 5 lines short of the last screen line.
Steps to Reproduce:
1. Open a file that has more lines than the window
2. Type L to go to the last line of window
Stops about 5 lines short of the last line
Cursor stops on last screen line
Additional info: I've changed the terminal font to 9 point mono if that makes any difference.
thank you for contacting us with your issue. This is actually not a bug - this behavior is caused by 'scrolloff' option (mentioned in Vim help for 'H' and 'L' commands), which is set to 5 by default (for showing context around cursor - this is how it is explained by upstream). You can change this behavior by setting it to 0 (:set scrolloff=0) in opened Vim or in your ~/.vimrc file. Closing as NOTABUG.