-
Notifications
You must be signed in to change notification settings - Fork 297
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
Signs are not shown correctly #431
Comments
What commit of the plugin are you using? Nvim or Vim? |
I am using last commit in |
I have occasionally experienced a hunk missing a sign while the hunk navigation still works. I've never been able to reproduce it reliably though and I'm not sure what the cause might be. Next time it happens, please could you show the result of |
Yes, sure. |
It seems that these two lines in my
I added these two lines to always show the sign column. When I commented those out, it works fine. |
Aha, that makes sense. You could try placing your dummy sign at line 9999, the same line as gitgutter, and also make sure you don't tell gitgutter to always show the sign column. It's one of the strange things about Vim's signs – the line number for a sign doesn't need to exist. |
Excuse me, I do not know much about vim signs. You mean I should change |
Yes, I mean change By not telling gitgutter to show the sign column, I meant don't add But I just checked and as of Vim 7.4.2201 you don't need to do this because it's built into Vim. You can just do this instead: |
Thanks a lot. I did not know about |
Great! |
Vim 8 introduced a new option to configure the state of the sign column to be always visible ("yes"), always hidden ("no") or to automatically toggle ("auto") when there are signs available to display. This change is related to the warning message added to "airblade/vim-gitgutter@dc73a81" which also advises to remove the custom option "g:gitgutter_sign_column_always = 1" and use "set signcolumn = auto" instead, described by the plugin owner in "airblade/vim-gitgutter#431" "airblade/vim-gitgutter#431 (comment)). References: :help signcolumn GH-32
Vim 8 adds a new option where the sign column can be always visible (yes), always hidden (no) or automatically toggled (auto) when signs are available to display. Prefer the more generic option over the plugin specific one, and set to automatically toggle. More details: arcticicestudio/igloo#32 airblade/vim-gitgutter@dc73a81 airblade/vim-gitgutter#431 (comment)
I have came across with this problem recently. The signs are not displayed correctly. This snapshot shows a file (right pane) compared to its HEAD version (left pane):
As you see, the first line is not annotated by
~
sign although it is detected as a hunk (for example during navigation by[c
or]c
). This is just an example. I am facing other similar issues; e.g. missing+
s.The text was updated successfully, but these errors were encountered: