-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
stage_buffer
can leave unstaged part
#1025
Comments
Very nice report and repro steps 👍 |
I'm not sure this is a bug. Nvim cannot display buffers with no lines as the cursor needs to go somewhere. When you run |
…but how to explain deletion? I tried to reproduce it again and noticed one missing assumption: empty file It seems that if the buffer contains nothing or some white character but the corresponding file is empty, the result of |
This is probably fixed by #1175 |
Looks good, at least when I follow repro steps on the current master of nvim. On the other side, I cannot reproduce this bug even after checking out Gitsigns back to the commit from the end of May (not precised the report). Anyway, thanks! |
Description
I found unstaged new line deletion after staging new empty buffer with
stage_buffer
subcommand. At the moment I cannot explain myself how nvim or gitsigns can cause it.No
.editorconfig
in working directory.Neovim version
v0.11.0-dev-124+g90a4b1a59
Operating system and version
Debian Sid
Expected behavior
It seems that
git diff
output on such file should be empty.Actual behavior
Minimal config
Steps to reproduce
Inside some Git repo
nvim --clean -u minimal.lua
new2:Gistigns stage_buffer
GIT_PAGER= git diff -- new2
Gitsigns debug messages
The text was updated successfully, but these errors were encountered: