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

Prompt can have bad interactions with some other plugins, like Ale #17

Open
lencioni opened this issue Jun 22, 2017 · 4 comments
Open
Labels

Comments

@lencioni
Copy link
Contributor

I am using Ale for async linting, which can update Vim in a way that messes up import JS when presented with the list of unresolved imports. This leaves Vim in a confusing state. Here's a demonstration:

import-js-ale

I imagine there are other plugins that might have similar interactions.

I wonder if we could fix this by using a nicer prompt. It would be great to use a command-t style prompt where one option is highlighted and I can press enter to select it and use arrow keys to move up and down the list. This would pave the way to add fuzzy text filtering as well, which could be helpful when presented with a lot of options.

@lencioni lencioni added the bug label Jun 22, 2017
lencioni added a commit to lencioni/import-js-simple-project that referenced this issue Jun 24, 2017
I am digging into an issue with the vim plugin where there is an
unfortunate interaction with Ale. In order to reproduce this
consistently, I need to have eslint running in this project.

Galooshi/vim-import-js#17
@lencioni
Copy link
Contributor Author

@w0rp I'm wondering if you have any thoughts on how to handle this. It seems that if I have an inputlist() active and then Ale comes back and updates the buffer with errors/warnings, the inputlist becomes unreadable. I tried setting let g:ale_sign_column_always = 1 to determine if it was because the gutter appeared, but that didn't resolve this.

@w0rp
Copy link

w0rp commented Jun 25, 2017

I'll file a bug for it.

@w0rp
Copy link

w0rp commented Jul 15, 2017

I was looking into this, and it looks like the inputlist rendering can mess up when any timer function ticks at all. You can try the following:

function Foo(...)
endfunction

call timer_start(2000, function('Foo'))
call inputlist([])

The cursor inside of the inputlist will move, possibly other things will go wrong. You can use call timer_stopall() if that function exists, but the results could be unpredictable.

I'll file this as a bug in Vim. I don't see any reason why even 'echo' should mess with inputlist.

@w0rp
Copy link

w0rp commented Jul 15, 2017

vim/vim#1843 I filed a bug in Vim here.

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

2 participants