Skip to content
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

Get signs from all groups #13

Open
aktau opened this issue Jun 10, 2019 · 2 comments
Open

Get signs from all groups #13

aktau opened this issue Jun 10, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@aktau
Copy link

aktau commented Jun 10, 2019

Currently vim-signjump uses the following to get a list of all placed signs in a buffer:

split(execute('sign place buffer='.a:buffer, 'silent'), '\n'), 

However, this doesn't work when a plugin has placed signs in their own group (an example is vim-lsp).

Changing this to:

split(execute('sign place group=* buffer='.a:buffer, 'silent'), '\n'), 

Fixes it. I haven't been able to observe an ill effect in vim-signjump.

@ZeroKnight ZeroKnight added the bug Something isn't working label Jun 12, 2019
@ZeroKnight
Copy link
Owner

group seems to be part of the new API, so this can be applied after handling #14.

@aktau
Copy link
Author

aktau commented Jun 12, 2019

It seems like group=* functionality (and the new API) was included in patch 8.1.0658. There were some hotfixes afterwards, but I think none that affected the fetching of group functionality.

These patches introduce both the new API and extend the old Ex command API, so indeed it would be wiser to have a cutoff point:

  1. Old API without groups for Vim versions pre-8.1.0658, or Neovim versions pre-exists('*sign_define')
  2. New API with groups for newer versions.

So yes, this can be done after or during #14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants