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

Sometimes running neomake can change which buffer is showing in your window #17

Closed
benekastah opened this issue Nov 21, 2014 · 9 comments
Labels

Comments

@benekastah
Copy link
Collaborator

Particularly when I do :lopen, sometimes a subsequent JobActivity handler call will switch my file buffer into the loclist buffer. It has to do with the code in the handler that briefly switches back to the original window/buffer you were on when you invoked neomake to process the task.

One potential solution is to only perform this work if the user is in the same window/buffer as they were when they invoked neomake. If they leave that window/buffer, defer the work until they return. Otherwise, we'll just have to make the current switching mechanism more robust.

@jebaum
Copy link

jebaum commented Jan 19, 2015

Just adding a note here, this problem will be much more easily solved when some of the suggestions in neovim/neovim#901 get implemented, particularly bufputlines and bufgetlines

@benekastah
Copy link
Collaborator Author

Yes, having functions that operate on a buffer without having to navigate to it would be fantastic. The hacks you have to do to get some of this stuff to work are pretty gross.

@seven1m
Copy link

seven1m commented Jan 26, 2015

Just wanted to chime in this happens to me regularly. Must be my habit of saving a file and switching to another buffer quickly.

I'm hoping there's a fix for this prior to neovim/neovim#901, since that could take awhile.

@Linuus
Copy link
Contributor

Linuus commented Feb 2, 2015

Yes, I get this a lot as well. I save, switch to another split window and the previous buffer changes :(

@benekastah
Copy link
Collaborator Author

I have a partial fix for this. It's got a couple of issues of its own I'm trying to work out. Hopefully it will be complete soon.

@seven1m
Copy link

seven1m commented Feb 2, 2015

@benekastah++ 100 internet points if you fix this.

@benekastah
Copy link
Collaborator Author

Ok, this should be fixed now. I got rid of the fancy window/buffer switching code that I had before, which means that if you want to see the result of :Neomake, you need to be in the buffer you started it from. You can leave the buffer; the output of the job(s) will be processed when you come back. It should be noted this restriction doesn't apply to :Neomake! (note the exclamation point). If you are in a quickfix window, :Neomake will try to process the output for the last window you were in (which does actually require a window switch, but it is much simpler than the last version).

@Linuus
Copy link
Contributor

Linuus commented Feb 4, 2015

Seems to work great. Thanks @benekastah

👍

@seven1m
Copy link

seven1m commented Feb 4, 2015

Fixed!!!!!

💸

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

No branches or pull requests

4 participants