Bug 1471449 - vi cursor movement incorrect for H and L commands
vi cursor movement incorrect for H and L commands
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: vim (Show other bugs)
26
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Karsten Hopp
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-15 20:36 EDT by x7y9
Modified: 2017-07-18 08:48 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-18 08:48:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description x7y9 2017-07-15 20:36:52 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
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 08:48:22 EDT
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.