-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
G does not move to the last line if it is an empty line. #1852
Comments
Sorry to be a pain-in-the-neck, but I think that this is a regression from my point of view. The so-called empty last line is not a line at all from vim's point of view; it is a phantom line. It's just the linebreak of the last line. All you have to do to see it is open any file in the VsVim code base because they all end in a linebreak, e.g. VsVim\Test\VimCoreTest\NormalModeIntegrationTest.cs, in vim and press In vim, pressing In fact, vim by default ensures that a file that ends in a linebreak continues to end in a linebreak. By contrast, VsVim, by allowing you to move to the beginning of the phantom line, makes it very easy to accidentally omit the final linebreak. So modifying |
I think that this issue is back with the latest version of vsvim (2.6.0.0) |
@paul2t The best way to diagnose this is to open the same file in VsVim and gvim and test the various commands. If you do this, you will see the |
Oh ok, you are right. Sorry, I didn't read your previous comment correctly. |
In Vim, if the last line is an empty line, pressing G will go to that line. In VsVim it doesn't do that. One possible fix is to change the 'GetLastLine' behavior in EditorUtils. I have a PR up with the change. Although, it is more of a roll back as the original code is from here https://searchcode.com/codesearch/view/9488852/# so I am sure it was originally written and later deleted by @jaredpar
Alternately, there seems to be a fix possible in VsVim itself as I came across these unit tests ...
Clearly there should be a way to move to the last line on a 'G' without changing editor utils. I can have a look and try to submit a PR if you could specify what would be a preferred fix.
The text was updated successfully, but these errors were encountered: