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

Error opening another instance of vim #6

Open
harriott opened this issue Feb 15, 2022 · 2 comments
Open

Error opening another instance of vim #6

harriott opened this issue Feb 15, 2022 · 2 comments

Comments

@harriott
Copy link

Arch Linux, gvim 8.2.4106-1, dotfiles stripped down to have only the plugin and these two configuration lines:

let g:loclist_follow = 1
packadd vim-loclist-follow

All is fine in one instance of gvim/nvim/vim, but when I open a file in another instance:

Error detected while processing function <SNR>86_LoclistFollowTarget:
line    1:
E121: Undefined variable: g:loclist_follow_target
elbeardmorez added a commit that referenced this issue Feb 16, 2022
-vim (all flavours) errors when no explicit override of the default
target type is present in a user's rc file. given this setting is not
stipulated as required in the README.md, this is a bug, present since

  commit 750bd03
  Author: Pete Beardmore <[email protected]>
  Date:   Tue Jul 30 18:24:51 2019 +0100

  [fix] inconsistent state on reload

[closes GitHub issue #6]
@elbeardmorez
Copy link
Owner

Hi @harriott.

Thank you very much for reporting this. You found a bug that lingered for years (since 750bd03 [fix] inconsistent state on reload on Tue Jul 30 18:24:51 2019 +0100) - there should have been a guard around the call to validate the target type!

I'd hazard a guess that the few that are using this had already set their target type to the newest (and perhaps most useful) towards flavour:

let g:loclist_follow_target = 'towards'

which you may already have tried. That would work around the error.

As far as replication goes, I did so with my vanilla vim by simply commenting out the above setting in my .vimrc. Apologies but I'm unable to construct a reasonable guess as to why you'd only be seeing this on opening a second instance of those apps. I also replicated the error following your recipe, but on first execution of gvim (executed via command line). Could I double check that you are executing these various binaries via command line too so that any errors from the binary are immediately visible.. ..and further, that you cannot see the error in question immediately with only single instances? If that is the case, then I'm currently stumped!

The trivial fix is in there now regardless

@harriott
Copy link
Author

@elbeardmorez, thanks for the fix (which I guess is too small to note in your CHANGELOG.md - we users can check our local version with git log). In my tests, I was calling gvim as usual for me with a key combination defined in my Openbox's rc.xml, and the error was reporting in gVim's 2nd instance commmand line window. I was opening my 2nd instances of nvim & vim from Bash command line in tmux . Only ever saw the error on 2nd instance of one of these vim variants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants