Bug 1471449

Summary: vi cursor movement incorrect for H and L commands
Product: [Fedora] Fedora Reporter: x7y9 <amberarrow>
Component: vimAssignee: Karsten Hopp <karsten>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 26CC: gchamoul, karsten, moshima.web, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-18 12:48:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description x7y9 2017-07-16 00:36:52 UTC
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
3.

Actual results:
Stops about 5 lines short of the last line

Expected results:
Cursor stops on last screen line

Additional info: I've changed the terminal font to 9 point mono if that makes any difference.

Comment 1 Zdenek Dohnal 2017-07-18 12:48:22 UTC
Hi,

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.