Bug 1471449 - vi cursor movement incorrect for H and L commands
Summary: vi cursor movement incorrect for H and L commands
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 26
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-16 00:36 UTC by x7y9
Modified: 2017-07-18 12:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-18 12:48:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.