-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Newline at end of file is not shown #779
Comments
I think this might be a limitation of Neovim, since buffers always include a newline at the end. There are options - Vim normally appends an <EOL> at the end of the file if there is none.
Setting the 'binary' option prevents this. If you want to add the final
<EOL>, set the 'endofline' option. You can also read the value of this
option to see if there was an <EOL> for the last line (you cannot see this
in the text). So apparently you can detect I tested with Vim 9 and it does work. So this could be a bug in Neovim. |
Raised neovim/neovim#24869 |
Hi, it seems like after #862, running |
Is there a hunk in the buffer before you do this? |
Ok, I can see the cause of the problem. Thanks for reporting. |
@lewis6991 thanks for #862 Now I see the missing sign. It would be good to fix displaying the details to show what really happens (as opposed to the image above). |
I think git has a special message for no newline at end of file. We can probably do the same. |
#863 fixes |
Description
Gitsigns seems to not detect newlines appended at the end of file.
Neovim version
NVIM v0.9.0-dev-1305+g83bfd94d1
Operating system and version
Debian Sid
Expected behavior
Detect bottom newline, show on signs and hunk window.
Actual behavior
No information about bottom newline fro mGisigns.
Minimal config
Steps to reproduce
GIT_PAGER= git diff
) before opening nvim:nvim --clean -u minimal.lua bar
Gitsigns get_hunks
(try alsopewview_hunk
).Gitsigns debug messages
The text was updated successfully, but these errors were encountered: